|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.load.ImportLobFile
class ImportLobFile
Helper class to read large object data at random locations from a file that contains large object data.
| Field Summary | |
|---|---|
private java.lang.String |
dataCodeset
|
private ImportFileInputStream |
lobInputStream
|
private LimitInputStream |
lobLimitIn
|
private java.io.Reader |
lobReader
|
| Constructor Summary | |
|---|---|
ImportLobFile(java.io.File lobFile,
java.lang.String dataCodeset)
Create a ImportLobFile object. |
|
| Method Summary | |
|---|---|
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(int 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ImportFileInputStream lobInputStream
private LimitInputStream lobLimitIn
private java.io.Reader lobReader
private java.lang.String dataCodeset
| Constructor Detail |
|---|
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| Method Detail |
|---|
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(int 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
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||