|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.PObjClob
public class PObjClob
This class provides a portable way to create a CLOB.
NOTE: This class is only suitable to create a CLOB to put data into the database. You will get back a database specific CLOB when reading.
| Field Summary | |
|---|---|
static java.sql.Clob |
EMPTY_CLOB
An empty unmodifiable CLOB. |
| Constructor Summary | |
|---|---|
PObjClob()
Creates a new empty CLOB. |
|
PObjClob(java.io.File file)
Creates a new CLOB that uses the specified file for the data. |
|
PObjClob(java.lang.String s)
Creates a new CLOC for the given string. |
|
| Method Summary | |
|---|---|
void |
free()
|
java.io.InputStream |
getAsciiStream()
Retrieves the CLOB value designated by this Clob object as an ASCII stream. |
java.io.Reader |
getCharacterStream()
Retrieves the CLOB value designated by this Clob object as a Reader object (or as a stream of characters). |
java.io.Reader |
getCharacterStream(long pos,
long length)
|
java.lang.String |
getSubString(long pos,
int length)
Retrieves a copy of the specified substring in the CLOB value designated by this Clob object. |
long |
length()
Retrieves the number of characters in the CLOB value designated by this Clob object. |
long |
position(java.sql.Clob searchstr,
long start)
Retrieves the character position at which the specified Clob object searchstr appears in this Clob object. |
long |
position(java.lang.String searchstr,
long start)
Retrieves the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object. |
java.io.OutputStream |
setAsciiStream(long pos)
Retrieves a stream to be used to write ASCII characters to the CLOB value that this Clob object represents, starting at position pos. |
java.io.Writer |
setCharacterStream(long pos)
Retrieves a stream to be used to write a stream of Unicode characters to the CLOB value that this Clob object represents, at position pos. |
int |
setString(long pos,
java.lang.String str)
Writes the given Java String to the CLOB value that this Clob object designates at the position pos. |
int |
setString(long pos,
java.lang.String str,
int offset,
int len)
Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents. |
void |
truncate(long len)
Truncates the CLOB value that this Clob designates to have a length of len characters. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.sql.Clob EMPTY_CLOB
| Constructor Detail |
|---|
public PObjClob()
public PObjClob(java.lang.String s)
public PObjClob(java.io.File file)
| Method Detail |
|---|
public java.io.InputStream getAsciiStream()
throws java.sql.SQLException
getAsciiStream in interface java.sql.Clobjava.sql.SQLException
public java.io.Reader getCharacterStream()
throws java.sql.SQLException
Reader object (or as a stream of characters).
getCharacterStream in interface java.sql.Clobjava.sql.SQLException
public java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
getSubString in interface java.sql.Clobjava.sql.SQLExceptionpublic long length()
length in interface java.sql.Clob
public long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLExceptionposition(String,long),
getSubString(long,int)
public long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.lang.UnsupportedOperationException
java.sql.SQLExceptionpublic java.io.OutputStream setAsciiStream(long pos)
setAsciiStream in interface java.sql.Clobjava.lang.UnsupportedOperationExceptionpublic java.io.Writer setCharacterStream(long pos)
setCharacterStream in interface java.sql.Clobjava.lang.UnsupportedOperationException
public final int setString(long pos,
java.lang.String str)
setString in interface java.sql.ClobsetString(long,String,int,int)
public int setString(long pos,
java.lang.String str,
int offset,
int len)
setString in interface java.sql.Clobjava.lang.UnsupportedOperationExceptionpublic void truncate(long len)
truncate in interface java.sql.Clobjava.lang.UnsupportedOperationExceptionpublic void free()
free in interface java.sql.Clob
public java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||