Package org.apache.derby.impl.load
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 String
private long
private long
private ImportLobFile
private 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 readslength
amount of data from an external file, starting atposition
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
free()
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.ReturnsCLOB
value designated by thisClob
object 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.long
length()
Returns the number of characters in thisCLOB
object.private SQLException
Return an unimplemented feature errorlong
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.long
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.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.int
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.int
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.void
truncate
(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 readslength
amount 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 thisCLOB
object.- Specified by:
length
in interfaceClob
- Returns:
- length of the
CLOB
in characters - Throws:
SQLException
- on any error.
-
getCharacterStream
ReturnsCLOB
value designated by thisClob
object as aReader
.- Specified by:
getCharacterStream
in interfaceClob
- Returns:
- a Reader containing the
CLOB
data. - 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:
getSubString
in 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:
getAsciiStream
in 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:
position
in 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:
position
in 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:
setString
in 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:
setString
in 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:
setAsciiStream
in 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:
setCharacterStream
in 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:
truncate
in interfaceClob
- Throws:
SQLException
- See Also:
-
getCharacterStream
Raise error, not used by import- Specified by:
getCharacterStream
in interfaceClob
- Throws:
SQLException
-
free
Raise error, not used by import- Specified by:
free
in interfaceClob
- Throws:
SQLException
-
methodNotImplemented
Return an unimplemented feature error
-