Class ImportLobFile
java.lang.Object
org.apache.derby.impl.load.ImportLobFile
Helper class to read large object data at random locations
from a file that contains large object data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate ImportFileInputStreamprivate LimitInputStreamprivate Reader -
Constructor Summary
ConstructorsConstructorDescriptionImportLobFile(File lobFile, String dataCodeset) Create a ImportLobFile object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close all the resources realated to the lob file.getBinaryStream(long offset, long length) Returns a stream that points to the lob data from file at the givenoffset.getCharacterStream(long offset, long length) Returns a stream that points to the clob data from file at the givenoffset.longgetClobDataLength(long offset, long length) Returns the clob data length in characters at the give location.getString(long offset, int length) Returns the clob data at the given location asString.private voidopenLobFile(File lobFile) Open the lob file and setup the stream required to read the data.
-
Field Details
-
lobInputStream
-
lobLimitIn
-
lobReader
-
dataCodeset
-
-
Constructor Details
-
ImportLobFile
-
-
Method Details
-
openLobFile
-
getBinaryStream
Returns a stream that points to the lob data from file at the givenoffset.- Parameters:
offset- byte offset of the column data in the file.length- length of the the data.- Throws:
IOException- if any I/O error occurs.
-
getString
Returns the clob data at the given location asString.- Parameters:
offset- byte offset of the column data in the file.length- length of the the data.- Throws:
IOException- on any I/O error.
-
getCharacterStream
Returns a stream that points to the clob data from file at the givenoffset.- Parameters:
offset- byte offset of the column data in the file.length- length of the the data in bytes.- Throws:
IOException- on any I/O error.
-
getClobDataLength
Returns the clob data length in characters at the give location.- Parameters:
offset- byte offset of the column data in the file.length- length of the the data in bytes.- Throws:
IOException- on any I/O error.
-
close
Close all the resources realated to the lob file.- Throws:
IOException
-