Package org.apache.derby.impl.load
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 String
private ImportFileInputStream
private LimitInputStream
private Reader
-
Constructor Summary
ConstructorsConstructorDescriptionImportLobFile
(File lobFile, String dataCodeset) Create a ImportLobFile object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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
.long
getClobDataLength
(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 void
openLobFile
(File lobFile) Open the lob file and setup the stream required to read the data.
-
Field Details
-
lobInputStream
-
lobLimitIn
-
lobReader
-
dataCodeset
-
-
Constructor Details
-
ImportLobFile
Create a ImportLobFile object.- Parameters:
lobFile
- the file which has the LOB Data.dataCodeset
- the code set to use char data in the file.- Throws:
Exception
-
-
Method Details
-
openLobFile
Open the lob file and setup the stream required to read the data.- Parameters:
lobFile
- the file that contains lob data.- Throws:
Exception
- if an error occurs.
-
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
-