|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ am overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.client.am
Class Clob

java.lang.Objectorg.apache.derby.client.am.Lob
org.apache.derby.client.am.Clob
- All Implemented Interfaces:
- java.sql.Clob, UnitOfWorkListener
- public class Clob
- extends Lob
- implements java.sql.Clob
- extends Lob
| Field Summary | |
protected java.io.InputStream |
asciiStream_
|
protected java.io.Reader |
characterStream_
|
protected java.lang.String |
encoding_
|
private PreparedStatement |
internalLengthStmt_
|
protected long |
lengthInBytes_
|
protected java.lang.String |
string_
|
protected java.io.InputStream |
unicodeStream_
|
protected byte[] |
utf8String_
|
| Fields inherited from class org.apache.derby.client.am.Lob |
agent_, ASCII_STREAM, BINARY_STREAM, BINARY_STRING, CHARACTER_STREAM, dataType_, lengthObtained_, sqlLength_, STRING, UNICODE_STREAM |
| Constructor Summary | |
private |
Clob(Agent agent)
|
|
Clob(Agent agent,
byte[] unconvertedBytes,
java.lang.String charsetName,
int dataOffset)
|
|
Clob(Agent agent,
java.io.InputStream inputStream,
java.lang.String encoding,
int length)
|
|
Clob(Agent agent,
java.io.Reader reader,
int length)
|
|
Clob(Agent agent,
java.lang.String string)
|
| Method Summary | |
void |
convertFromAsciiToCharacterStream()
|
protected Clob |
createClobWrapper(java.sql.Clob clob)
|
protected void |
finalize()
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. |
java.io.InputStream |
getAsciiStream()
This method returns a byte stream that reads the contents of this Clob as a series of ASCII bytes. |
private java.io.InputStream |
getAsciiStreamX()
|
long |
getByteLength()
|
java.io.Reader |
getCharacterStream()
This method returns a character stream that reads the contents of this Clob. |
private java.io.Reader |
getCharacterStreamX()
|
java.lang.String |
getString()
|
java.lang.String |
getSubString(long pos,
int length)
This method returns the specified portion of this Clob as a
String. |
private java.lang.String |
getSubStringX(long pos,
int length)
|
java.io.InputStream |
getUnicodeStream()
|
int |
getUTF8Length()
|
byte[] |
getUtf8String()
|
boolean |
isAsciiStream()
|
boolean |
isCharacterStream()
|
boolean |
isString()
|
boolean |
isUnicodeStream()
|
long |
length()
This method returns the number of characters in this Clob. |
long |
position(java.sql.Clob searchstr,
long start)
This method returns the index into this Clob of the first
occurrence of the specified character pattern (supplied by the caller as a
Clob). |
long |
position(java.lang.String searchstr,
long start)
This method returns the index into this Clob of the first
occurrence of the specified character pattern (supplied by the caller as a
String). |
private long |
positionX(java.sql.Clob searchstr,
long start)
|
private long |
positionX(java.lang.String searchstr,
long start)
|
java.io.OutputStream |
setAsciiStream(long pos)
Returns an ASCII text stream that writes into this Clob,
starting at the specified index. |
java.io.Writer |
setCharacterStream(long pos)
Returns a character stream that writes into this Clob,
starting at the specified index. |
int |
setString(long pos,
java.lang.String str)
Writes the specified string into this Clob, starting at the
specified index. |
int |
setString(long pos,
java.lang.String str,
int offset,
int len)
Writes the specified portion of a string into this Clob,
starting at the specified index. |
int |
setStringX(long pos,
java.lang.String str,
int offset,
int len)
|
void |
truncate(long len)
Truncates this Clob to be at most the specified number of
characters long. |
| Methods inherited from class org.apache.derby.client.am.Lob |
checkForClosedConnection, completeLocalCommit, completeLocalCommit, completeLocalRollback, completeLocalRollback, getAgent, listenToUnitOfWork, sqlLength |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
string_
protected java.lang.String string_
asciiStream_
protected java.io.InputStream asciiStream_
unicodeStream_
protected java.io.InputStream unicodeStream_
characterStream_
protected java.io.Reader characterStream_
utf8String_
protected byte[] utf8String_
lengthInBytes_
protected long lengthInBytes_
internalLengthStmt_
private PreparedStatement internalLengthStmt_
encoding_
protected java.lang.String encoding_
| Constructor Detail |
Clob
public Clob(Agent agent, java.lang.String string)
Clob
public Clob(Agent agent, byte[] unconvertedBytes, java.lang.String charsetName, int dataOffset) throws SqlException
Clob
public Clob(Agent agent, java.io.InputStream inputStream, java.lang.String encoding, int length) throws SqlException
Clob
public Clob(Agent agent, java.io.Reader reader, int length)
Clob
private Clob(Agent agent)
| Method Detail |
finalize
protected void finalize()
throws java.lang.Throwable
- Description copied from class:
java.lang.Object - Called on an object by the Virtual Machine at most once,
at some point after the Object is determined unreachable
but before it is destroyed. You would think that this
means it eventually is called on every Object, but this is
not necessarily the case. If execution terminates
abnormally, garbage collection does not always happen.
Thus you cannot rely on this method to always work.
For finer control over garbage collection, use references
from the
java.lang.refpackage.Virtual Machines are free to not call this method if they can determine that it does nothing important; for example, if your class extends Object and overrides finalize to do simply
super.finalize().finalize() will be called by a java.lang.Thread that has no locks on any Objects, and may be called concurrently. There are no guarantees on the order in which multiple objects are finalized. This means that finalize() is usually unsuited for performing actions that must be thread-safe, and that your implementation must be use defensive programming if it is to always work.
If an Exception is thrown from finalize() during garbage collection, it will be patently ignored and the Object will still be destroyed.
It is allowed, although not typical, for user code to call finalize() directly. User invocation does not affect whether automatic invocation will occur. It is also permitted, although not recommended, for a finalize() method to "revive" an object by making it reachable from normal code again.
Unlike constructors, finalize() does not get called for an object's superclass unless the implementation specifically calls
super.finalize().The default implementation does nothing.
length
public long length()
throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns the number of characters in this
Clob.- Specified by:
lengthin interfacejava.sql.Clob
getSubString
public java.lang.String getSubString(long pos, int length) throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns the specified portion of this
Clobas aString.- Specified by:
getSubStringin interfacejava.sql.Clob
getSubStringX
private java.lang.String getSubStringX(long pos, int length) throws SqlException
getCharacterStream
public java.io.Reader getCharacterStream() throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns a character stream that reads the contents of this
Clob.- Specified by:
getCharacterStreamin interfacejava.sql.Clob
getCharacterStreamX
private java.io.Reader getCharacterStreamX() throws SqlException
getAsciiStream
public java.io.InputStream getAsciiStream() throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns a byte stream that reads the contents of this
Clobas a series of ASCII bytes.- Specified by:
getAsciiStreamin interfacejava.sql.Clob
getAsciiStreamX
private java.io.InputStream getAsciiStreamX() throws SqlException
position
public long position(java.lang.String searchstr, long start) throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns the index into this
Clobof the first occurrence of the specified character pattern (supplied by the caller as aString). The search begins at the specified index.- Specified by:
positionin interfacejava.sql.Clob
positionX
private long positionX(java.lang.String searchstr, long start) throws SqlException
position
public long position(java.sql.Clob searchstr, long start) throws SqlException
- Description copied from interface:
java.sql.Clob - This method returns the index into this
Clobof the first occurrence of the specified character pattern (supplied by the caller as aClob). The search begins at the specified index.- Specified by:
positionin interfacejava.sql.Clob
positionX
private long positionX(java.sql.Clob searchstr, long start) throws SqlException
setString
public int setString(long pos,
java.lang.String str)
throws SqlException
- Description copied from interface:
java.sql.Clob - Writes the specified string into this
Clob, starting at the specified index.- Specified by:
setStringin interfacejava.sql.Clob
setString
public int setString(long pos,
java.lang.String str,
int offset,
int len)
throws SqlException
- Description copied from interface:
java.sql.Clob - Writes the specified portion of a string into this
Clob, starting at the specified index.- Specified by:
setStringin interfacejava.sql.Clob
setStringX
public int setStringX(long pos,
java.lang.String str,
int offset,
int len)
throws SqlException
setAsciiStream
public java.io.OutputStream setAsciiStream(long pos) throws SqlException
- Description copied from interface:
java.sql.Clob - Returns an ASCII text stream that writes into this
Clob, starting at the specified index.- Specified by:
setAsciiStreamin interfacejava.sql.Clob
setCharacterStream
public java.io.Writer setCharacterStream(long pos) throws SqlException
- Description copied from interface:
java.sql.Clob - Returns a character stream that writes into this
Clob, starting at the specified index.- Specified by:
setCharacterStreamin interfacejava.sql.Clob
truncate
public void truncate(long len)
throws SqlException
- Description copied from interface:
java.sql.Clob - Truncates this
Clobto be at most the specified number of characters long.- Specified by:
truncatein interfacejava.sql.Clob
isString
public boolean isString()
isAsciiStream
public boolean isAsciiStream()
isCharacterStream
public boolean isCharacterStream()
isUnicodeStream
public boolean isUnicodeStream()
getUnicodeStream
public java.io.InputStream getUnicodeStream()
getString
public java.lang.String getString()
getUtf8String
public byte[] getUtf8String()
getUTF8Length
public int getUTF8Length()
throws SqlException
createClobWrapper
protected Clob createClobWrapper(java.sql.Clob clob) throws SqlException
convertFromAsciiToCharacterStream
public void convertFromAsciiToCharacterStream()
throws SqlException
getByteLength
public long getByteLength()
throws SqlException
|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ am overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC