com.ibm.as400.access
Class AS400JDBCClobLocator

java.lang.Object
  |
  +--com.ibm.as400.access.AS400JDBCClobLocator

public class AS400JDBCClobLocator
extends java.lang.Object
implements java.sql.Clob

The AS400JDBCClobLocator class provides access to character large objects. The data is valid only within the current transaction.


Method Summary
 java.io.InputStream getAsciiStream()
          Returns the entire clob as a stream of ASCII characters.
 java.io.Reader getCharacterStream()
          Returns the entire clob as a character stream.
 java.lang.String getSubString(long start, int length)
          Returns part of the contents of the clob.
 long length()
          Returns the length of the clob.
 long position(java.sql.Clob pattern, long start)
          Returns the position at which a pattern is found in the clob.
 long position(java.lang.String pattern, long start)
          Returns the position at which a pattern is found in the clob.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAsciiStream

public java.io.InputStream getAsciiStream()
                                   throws java.sql.SQLException
Returns the entire clob as a stream of ASCII characters.
Specified by:
getAsciiStream in interface java.sql.Clob
Returns:
The stream.
Throws:
java.sql.SQLException - If an error occurs.

getCharacterStream

public java.io.Reader getCharacterStream()
                                  throws java.sql.SQLException
Returns the entire clob as a character stream.
Specified by:
getCharacterStream in interface java.sql.Clob
Returns:
The stream.
Throws:
java.sql.SQLException - If an error occurs.

getSubString

public java.lang.String getSubString(long start,
                                     int length)
                              throws java.sql.SQLException
Returns part of the contents of the clob.
Specified by:
getSubString in interface java.sql.Clob
Parameters:
start - The position within the clob (1-based).
length - The length to return.
Returns:
The contents.
Throws:
java.sql.SQLException - If the position is not valid, if the length is not valid, or an error occurs.

length

public long length()
            throws java.sql.SQLException
Returns the length of the clob.
Specified by:
length in interface java.sql.Clob
Returns:
The length of the clob, in characters.
Throws:
java.sql.SQLException - If an error occurs.

position

public long position(java.lang.String pattern,
                     long start)
              throws java.sql.SQLException
Returns the position at which a pattern is found in the clob. This method is not supported.
Specified by:
position in interface java.sql.Clob
Parameters:
pattern - The pattern.
start - The position within the clob to begin searching (1-based).
Returns:
Always -1. This method is not supported.
Throws:
java.sql.SQLException - If the pattern is null, the position is not valid, or an error occurs.

position

public long position(java.sql.Clob pattern,
                     long start)
              throws java.sql.SQLException
Returns the position at which a pattern is found in the clob. This method is not supported.
Specified by:
position in interface java.sql.Clob
Parameters:
pattern - The pattern.
start - The position within the clob to begin searching (1-based).
Returns:
Always -1. This method is not supported.
Throws:
java.sql.SQLException - If the pattern is null, the position is not valid, or an error occurs.