class ImportLobFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
dataCodeset |
private ImportFileInputStream |
lobInputStream |
private LimitInputStream |
lobLimitIn |
private java.io.Reader |
lobReader |
Constructor and Description |
---|
ImportLobFile(java.io.File lobFile,
java.lang.String dataCodeset)
Create a ImportLobFile object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all the resources realated to the lob file.
|
java.io.InputStream |
getBinaryStream(long offset,
long length)
Returns a stream that points to the lob data from file at the
given
offset . |
java.io.Reader |
getCharacterStream(long offset,
long length)
Returns a stream that points to the clob data from file at the
given
offset . |
long |
getClobDataLength(long offset,
long length)
Returns the clob data length in characters at the give location.
|
java.lang.String |
getString(long offset,
int length)
Returns the clob data at the given location as
String . |
private void |
openLobFile(java.io.File lobFile)
Open the lob file and setup the stream required to read the data.
|
private ImportFileInputStream lobInputStream
private LimitInputStream lobLimitIn
private java.io.Reader lobReader
private java.lang.String dataCodeset
ImportLobFile(java.io.File lobFile, java.lang.String dataCodeset) throws java.lang.Exception
lobFile
- the file which has the LOB Data.dataCodeset
- the code set to use char data in the file.java.lang.Exception
private void openLobFile(java.io.File lobFile) throws java.lang.Exception
lobFile
- the file that contains lob data.java.lang.Exception
- if an error occurs.public java.io.InputStream getBinaryStream(long offset, long length) throws java.io.IOException
offset
.offset
- byte offset of the column data in the file.length
- length of the the data.java.io.IOException
- if any I/O error occurs.public java.lang.String getString(long offset, int length) throws java.io.IOException
String
.offset
- byte offset of the column data in the file.length
- length of the the data.java.io.IOException
- on any I/O error.public java.io.Reader getCharacterStream(long offset, long length) throws java.io.IOException
offset
.offset
- byte offset of the column data in the file.length
- length of the the data in bytes.java.io.IOException
- on any I/O error.public long getClobDataLength(long offset, long length) throws java.io.IOException
offset
- byte offset of the column data in the file.length
- length of the the data in bytes.java.io.IOException
- on any I/O error.public void close() throws java.io.IOException
java.io.IOException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.