Object Translator

com.informix.ormapper
Class OClob

java.lang.Object
  |
  +--com.informix.ormapper.OClob

public class OClob
extends java.lang.Object

External: This is the utility class for manipulating a CLOB (character large object) data type.

See Also:
OBlob

Constructor Summary
OClob()
          Constructs an empty CLOB object.
OClob(java.sql.Clob _clob)
          Constructs a CLOB object from an existing java.sql.Clob object.
 
Method Summary
 java.io.InputStream getAsciiStream()
          Retrieves the CLOB data as a stream.
 java.sql.Clob getClob()
          Gets the java.sql.Clob object reference set in a setClob() call or a constructor.
 long length()
          Returns the number of bytes in the CLOB data designated by this CLOB object.
 void load(java.lang.String fileName)
          Loads the CLOB data from a file.
 void setAsciiStream(java.io.InputStream _in, long _length)
          Sets the CLOB data as an input stream.
 void setClob(java.sql.Clob _clob)
          Sets the CLOB data from an existing java.sql.Clob object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OClob

public OClob()
Constructs an empty CLOB object.

OClob

public OClob(java.sql.Clob _clob)
Constructs a CLOB object from an existing java.sql.Clob object.
Parameters:
_clob - a java.sql.Clob object.
Method Detail

getAsciiStream

public java.io.InputStream getAsciiStream()
                                   throws DatabaseException
Retrieves the CLOB data as a stream.
Returns:
the data stream or null if no CLOB or input stream has been set yet.

setAsciiStream

public void setAsciiStream(java.io.InputStream _in,
                           long _length)
Sets the CLOB data as an input stream.
Parameters:
_in - the data input stream.
_length - the length of the data input stream.

length

public long length()
            throws DatabaseException
Returns the number of bytes in the CLOB data designated by this CLOB object.
Returns:
length of the CLOB in bytes or -1 if there is no data stream or CLOB data.

load

public void load(java.lang.String fileName)
          throws java.io.FileNotFoundException
Loads the CLOB data from a file.
Parameters:
fileName - name of the file that contains CLOB data.

setClob

public void setClob(java.sql.Clob _clob)
Sets the CLOB data from an existing java.sql.Clob object.
Parameters:
_clob - a java.sql.Clob object.

getClob

public java.sql.Clob getClob()
Gets the java.sql.Clob object reference set in a setClob() call or a constructor.
Returns:
the java.sql.Clob object representing CLOB data.

Object Translator

Copyright © 1999-2000 Informix Software, Inc.