Top Description Fields Constructors Methods
org.hsqldb.types

public final Class ClobInputStream

extends Reader
Class Inheritance
Imports
java.io.IOException, .Reader, org.hsqldb.SessionInterface, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.java.JavaSystem

This class is used as an InputStream to retrieve data from a Clob. mark() and reset() are not supported.
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
1.9.0
Version
2.3.4

Field Summary

Modifier and TypeField and Description
pack-priv final long
pack-priv char[]
pack-priv long
pack-priv final ClobData
pack-priv long
pack-priv boolean
public final SessionInterface
pack-priv int
Inherited from java.io.Reader:
lock

Constructor Summary

AccessConstructor and Description
public
ClobInputStream(SessionInterface session, ClobData clob, long offset, long length)

Method Summary

Modifier and TypeMethod and Description
public int
private void
public void
close()

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

Closes the stream and releases any system resources associated with it.

pack-priv static boolean
isInLimits(long fullLength, long pos, long len)

public int
read()

Overrides java.io.Reader.read.

Reads a single character.

public int
read(char[] cbuf, int off, int len)

Implements abstract java.io.Reader.read.

Reads characters into a portion of an array.

private void
public long
skip(long n)

Overrides java.io.Reader.skip.

Skips characters.

Inherited from java.io.Reader:
markmarkSupportednullReaderofreadreadreadAllAsStringreadAllLinesreadyresettransferTo

Field Detail

availableLengthback to summary
pack-priv final long availableLength
bufferback to summary
pack-priv char[] buffer
bufferOffsetback to summary
pack-priv long bufferOffset
clobback to summary
pack-priv final ClobData clob
currentPositionback to summary
pack-priv long currentPosition
isClosedback to summary
pack-priv boolean isClosed
sessionback to summary
public final SessionInterface session
streamBlockSizeback to summary
pack-priv int streamBlockSize

Constructor Detail

ClobInputStreamback to summary
public ClobInputStream(SessionInterface session, ClobData clob, long offset, long length)

Method Detail

availableback to summary
public int available()
checkClosedback to summary
private void checkClosed() throws IOException
closeback to summary
public void close()

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

Doc from java.io.Reader.close.

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.

isInLimitsback to summary
pack-priv static boolean isInLimits(long fullLength, long pos, long len)
readback to summary
public int read() throws IOException

Overrides java.io.Reader.read.

Doc from java.io.Reader.read.

Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

Exceptions
IOException:
If an I/O error occurs
readback to summary
public int read(char[] cbuf, int off, int len) throws IOException

Implements abstract java.io.Reader.read.

Doc from java.io.Reader.read.

Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf.

Exceptions
IOException:
If an I/O error occurs
readIntoBufferback to summary
private void readIntoBuffer()
skipback to summary
public long skip(long n) throws IOException

Overrides java.io.Reader.skip.

Doc from java.io.Reader.skip.

Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.

Exceptions
IOException:
If an I/O error occurs