org.postgresql.pljava.jdbc
Class ClobValue

java.lang.Object
  extended by java.io.Reader
      extended by org.postgresql.pljava.jdbc.ClobValue
All Implemented Interfaces:
Closeable, Readable, Clob

public class ClobValue
extends Reader
implements Clob

Author:
Thomas Hallgren

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
ClobValue(Reader reader, long nChars)
           
ClobValue(String value)
           
 
Method Summary
 void close()
           
 InputStream getAsciiStream()
           
 Reader getCharacterStream()
           
static int getReaderLength(Reader value)
           
 String getSubString(long pos, int length)
           
 long length()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 long position(Clob pattern, long start)
          Not supported.
 long position(String pattern, long start)
          In this method is not supported by ClobValue
 int read()
           
 int read(char[] b)
           
 int read(char[] b, int off, int len)
           
 boolean ready()
           
 void reset()
           
 OutputStream setAsciiStream(long pos)
          In this method is not supported by ClobValue
 Writer setCharacterStream(long pos)
          In this method is not supported by ClobValue
 int setString(long pos, String str)
          In this method is not supported by ClobValue
 int setString(long pos, String str, int offset, int len)
          In this method is not supported by ClobValue
 long skip(long nBytes)
           
 void truncate(long len)
          In this method is not supported by ClobValue
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClobValue

public ClobValue(Reader reader,
                 long nChars)

ClobValue

public ClobValue(String value)
Method Detail

getReaderLength

public static int getReaderLength(Reader value)
                           throws SQLException
Throws:
SQLException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

getAsciiStream

public InputStream getAsciiStream()
Specified by:
getAsciiStream in interface Clob

getCharacterStream

public Reader getCharacterStream()
Specified by:
getCharacterStream in interface Clob

getSubString

public String getSubString(long pos,
                           int length)
                    throws SQLException
Specified by:
getSubString in interface Clob
Throws:
SQLException

length

public long length()
Specified by:
length in interface Clob

mark

public void mark(int readLimit)
          throws IOException
Overrides:
mark in class Reader
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader

position

public long position(Clob pattern,
                     long start)
Not supported.

Specified by:
position in interface Clob

position

public long position(String pattern,
                     long start)
In this method is not supported by ClobValue

Specified by:
position in interface Clob

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] b)
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] b,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

ready

public boolean ready()
              throws IOException
Overrides:
ready in class Reader
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class Reader
Throws:
IOException

setAsciiStream

public OutputStream setAsciiStream(long pos)
In this method is not supported by ClobValue

Specified by:
setAsciiStream in interface Clob

setCharacterStream

public Writer setCharacterStream(long pos)
In this method is not supported by ClobValue

Specified by:
setCharacterStream in interface Clob

setString

public int setString(long pos,
                     String str)
In this method is not supported by ClobValue

Specified by:
setString in interface Clob

setString

public int setString(long pos,
                     String str,
                     int offset,
                     int len)
In this method is not supported by ClobValue

Specified by:
setString in interface Clob

skip

public long skip(long nBytes)
          throws IOException
Overrides:
skip in class Reader
Throws:
IOException

truncate

public void truncate(long len)
In this method is not supported by ClobValue

Specified by:
truncate in interface Clob