java.sql.Clobclass ImportClob
extends java.lang.Object
implements java.sql.Clob
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.| Modifier and Type | Field | Description |
|---|---|---|
private java.lang.String |
clobData |
|
private long |
clobLength |
|
private long |
length |
|
private ImportLobFile |
lobFile |
|
private long |
position |
| Constructor | Description |
|---|---|
ImportClob(java.lang.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 reads
length amount of
data from an external file, starting at position . |
| Modifier and Type | Method | Description |
|---|---|---|
void |
free() |
Raise error, not used by import
|
java.io.InputStream |
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.
|
java.io.Reader |
getCharacterStream() |
Returns
CLOB value designated by this
Clob object as a Reader . |
java.io.Reader |
getCharacterStream(long pos,
long length) |
Raise error, not used by import
|
java.lang.String |
getSubString(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 this
CLOB object. |
private java.sql.SQLException |
methodNotImplemented() |
Return an unimplemented feature error
|
long |
position(java.lang.String searchstr,
long start) |
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 |
position(java.sql.Clob searchstr,
long start) |
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.
|
java.io.OutputStream |
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.
|
java.io.Writer |
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 |
setString(long pos,
java.lang.String str) |
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 |
setString(long pos,
java.lang.String str,
int offset,
int 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.
|
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.
|
private ImportLobFile lobFile
private long position
private long length
private long clobLength
private java.lang.String clobData
public ImportClob(ImportLobFile lobFile, long position, long length) throws java.io.IOException
length amount of
data from an external file, starting at position .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.java.io.IOExceptionpublic ImportClob(java.lang.String data)
data - String that contains the clob data.public long length()
throws java.sql.SQLException
CLOB object.length in interface java.sql.ClobCLOB in charactersjava.sql.SQLException - on any error.public java.io.Reader getCharacterStream()
throws java.sql.SQLException
CLOB value designated by this
Clob object as a Reader .getCharacterStream in interface java.sql.ClobCLOB data.java.sql.SQLException - if any error occurs while setting up
this clob data in the import file as Reader.Clobpublic java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
getSubString in interface java.sql.Clobjava.sql.SQLExceptionClobpublic java.io.InputStream getAsciiStream()
throws java.sql.SQLException
getAsciiStream in interface java.sql.Clobjava.sql.SQLExceptionClobpublic long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLExceptionClobpublic long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLExceptionClobpublic int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionClobpublic int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLExceptionClobpublic java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
setAsciiStream in interface java.sql.Clobjava.sql.SQLExceptionClobpublic java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
setCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionClobpublic void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Clobjava.sql.SQLExceptionClobpublic java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.Clobjava.sql.SQLExceptionprivate java.sql.SQLException methodNotImplemented()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.