Class ImportClob
java.lang.Object
org.apache.derby.impl.load.ImportClob
- All Implemented Interfaces:
Clob
This class implements
java.sql.CLOB interface .
Objects created using the ImportClob class are
intended to be be used to create a clob object of the data stored
in an import file. Only the routines that are needed to read the
clob data for the clob columns by the inserts done through the VTI
have real implementations, Other routines are dummy ones to satisfy
java.sql.Clob interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate longprivate longprivate ImportLobFileprivate long -
Constructor Summary
ConstructorsConstructorDescriptionImportClob(String data) Create a Clob object, whose value is given as string.ImportClob(ImportLobFile lobFile, long position, long length) Create a import Clob object, that readslengthamount of data from an external file, starting atposition. -
Method Summary
Modifier and TypeMethodDescriptionvoidfree()Raise error, not used by importThis routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.ReturnsCLOBvalue designated by thisClobobject as aReader.getCharacterStream(long pos, long length) Raise error, not used by importgetSubString(long pos, int length) This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.longlength()Returns the number of characters in thisCLOBobject.private SQLExceptionReturn an unimplemented feature errorlongThis routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.longThis routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.setAsciiStream(long pos) This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.setCharacterStream(long pos) This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.intThis routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.intThis routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.voidtruncate(long len) This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.
-
Field Details
-
lobFile
-
position
private long position -
length
private long length -
clobLength
private long clobLength -
clobData
-
-
Constructor Details
-
ImportClob
Create a import Clob object, that readslengthamount of data from an external file, starting atposition.- Parameters:
lobFile- lob file resource object, using which data is read.position- byte offset in the file, of this clob column data.length- length of this clob object data in bytes.- Throws:
IOException
-
ImportClob
Create a Clob object, whose value is given as string.- Parameters:
data- String that contains the clob data.
-
-
Method Details
-
length
Returns the number of characters in thisCLOBobject.- Specified by:
lengthin interfaceClob- Returns:
- length of the
CLOBin characters - Throws:
SQLException- on any error.
-
getCharacterStream
ReturnsCLOBvalue designated by thisClobobject as aReader.- Specified by:
getCharacterStreamin interfaceClob- Returns:
- a Reader containing the
CLOBdata. - Throws:
SQLException- if any error occurs while setting up this clob data in the import file as Reader.- See Also:
-
getSubString
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
getSubStringin interfaceClob- Throws:
SQLException- See Also:
-
getAsciiStream
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
getAsciiStreamin interfaceClob- Throws:
SQLException- See Also:
-
position
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
positionin interfaceClob- Throws:
SQLException- See Also:
-
position
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
positionin interfaceClob- Throws:
SQLException- See Also:
-
setString
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
setStringin interfaceClob- Throws:
SQLException- See Also:
-
setString
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
setStringin interfaceClob- Throws:
SQLException- See Also:
-
setAsciiStream
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
setAsciiStreamin interfaceClob- Throws:
SQLException- See Also:
-
setCharacterStream
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
setCharacterStreamin interfaceClob- Throws:
SQLException- See Also:
-
truncate
This routine is not used by the VTI to read the data, so no implementation is provided, an exception is thrown if it is called.- Specified by:
truncatein interfaceClob- Throws:
SQLException- See Also:
-
getCharacterStream
Raise error, not used by import- Specified by:
getCharacterStreamin interfaceClob- Throws:
SQLException
-
free
Raise error, not used by import- Specified by:
freein interfaceClob- Throws:
SQLException
-
methodNotImplemented
Return an unimplemented feature error
-