Top Description Fields Constructors Methods
org.hsqldb.rowio

pack-priv abstract Class RowInputBase

extends HsqlByteArrayInputStream
Class Inheritance
Known Direct Subclasses
org.hsqldb.rowio.RowInputBinary, org.hsqldb.rowio.RowInputText, org.hsqldb.rowio.RowInputTextLog
Imports
java.math.BigDecimal, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.HsqlByteArrayInputStream, org.hsqldb.types.BinaryData, .BlobData, .ClobData, .IntervalMonthData, .IntervalSecondData, .TimeData, .TimestampData, .Type, .Types

Base class for reading the data for a database row in different formats. Defines the methods that are independent of storage format and declares the format-dependent methods that subclasses should define.
Authors
Bob Preston (sqlbob@users dot sourceforge.net), Fred Toussi (fredt@users dot sourceforge.net)
Since
1.7.0
Version
2.4.0

Field Summary

Modifier and TypeField and Description
protected long
pack-priv static final int
protected int
Inherited from org.hsqldb.lib.HsqlByteArrayInputStream:
buffercountmarkpos

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
RowInputBase(int size)

pack-priv
RowInputBase(byte[] buf)

Constructor takes a complete row

Method Summary

Modifier and TypeMethod and Description
public byte[]
public long
public int
protected abstract Object[]
protected abstract Long
protected abstract BinaryData
protected abstract BinaryData
protected abstract BlobData
protected abstract Boolean
protected abstract String
readChar(Type type)

protected abstract ClobData
public Object[]
readData(Type[]
data types
colTypes
)

reads row data from a stream using the JDBC types in colTypes

public Object
readData(Type type)

protected abstract TimestampData
readDate(Type type)

protected abstract IntervalSecondData
protected abstract BigDecimal
protected abstract Integer
public String
readLine()

Overrides org.hsqldb.lib.HsqlByteArrayInputStream.readLine.

Implements java.io.DataInput.readLine.

Reads the next line of text from the input stream.

protected abstract boolean
protected abstract Object
protected abstract Double
protected abstract Integer
public abstract String
protected abstract TimeData
readTime(Type type)

protected abstract TimestampData
public abstract int
protected abstract BinaryData
protected abstract IntervalMonthData
public void
resetBlock(long filepos, int rowsize)

Used to reset the row, ready for a new row to be written into the byte[] buffer by an external routine.

public void
resetRow(long filepos, int rowsize)

Used to reset the row, ready for a new row to be written into the byte[] buffer by an external routine.

public int
skipBytes(int n)

Overrides org.hsqldb.lib.HsqlByteArrayInputStream.skipBytes.

Implements java.io.DataInput.skipBytes.

Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.

Inherited from org.hsqldb.lib.HsqlByteArrayInputStream:
availableclosegetPosmarkmarkSupportedreadreadreadBooleanreadBytereadCharreadDoublereadFloatreadFullyreadFullyreadIntreadLongreadShortreadUnsignedBytereadUnsignedShortreadUTFresetskip

Field Detail

filePosback to summary
protected long filePos
NO_POSback to summary
pack-priv static final int NO_POS
sizeback to summary
protected int size

Constructor Detail

RowInputBaseback to summary
pack-priv RowInputBase()
RowInputBaseback to summary
pack-priv RowInputBase(int size)
RowInputBaseback to summary
pack-priv RowInputBase(byte[] buf)

Constructor takes a complete row

Method Detail

getBufferback to summary
public byte[] getBuffer()
getFilePositionback to summary
public long getFilePosition()
getSizeback to summary
public int getSize()
readArrayback to summary
protected abstract Object[] readArray(Type type)
readBigintback to summary
protected abstract Long readBigint()
readBinaryback to summary
protected abstract BinaryData readBinary()
readBitback to summary
protected abstract BinaryData readBit()
readBlobback to summary
protected abstract BlobData readBlob()
readBooleback to summary
protected abstract Boolean readBoole()
readCharback to summary
protected abstract String readChar(Type type)
readClobback to summary
protected abstract ClobData readClob()
readDataback to summary
public Object[] readData(Type[] colTypes)

reads row data from a stream using the JDBC types in colTypes

Parameters
colTypes:Type[]

data types

readDataback to summary
public Object readData(Type type)
readDateback to summary
protected abstract TimestampData readDate(Type type)
readDaySecondIntervalback to summary
protected abstract IntervalSecondData readDaySecondInterval(Type type)
readDecimalback to summary
protected abstract BigDecimal readDecimal(Type type)
readIntegerback to summary
protected abstract Integer readInteger()
readLineback to summary
public String readLine()

Overrides org.hsqldb.lib.HsqlByteArrayInputStream.readLine.

Implements java.io.DataInput.readLine.

Doc from java.io.DataInput.readLine.

Reads the next line of text from the input stream. It reads successive bytes, converting each byte separately into a character, until it encounters a line terminator or end of file; the characters read are then returned as a String. Note that because this method processes bytes, it does not support input of the full Unicode character set.

If end of file is encountered before even one byte can be read, then null is returned. Otherwise, each byte that is read is converted to type char by zero-extension. If the character '\n' is encountered, it is discarded and reading ceases. If the character '\r' is encountered, it is discarded and, if the following byte converts to the character '\n', then that is discarded also; reading then ceases. If end of file is encountered before either of the characters '\n' and '\r' is encountered, reading ceases. Once reading has ceased, a String is returned that contains all the characters read and not discarded, taken in order. Note that every character in this string will have a value less than \u0100, that is, (char)256.

readNullback to summary
protected abstract boolean readNull()
readOtherback to summary
protected abstract Object readOther()
readRealback to summary
protected abstract Double readReal()
readSmallintback to summary
protected abstract Integer readSmallint()
readStringback to summary
public abstract String readString()
readTimeback to summary
protected abstract TimeData readTime(Type type)
readTimestampback to summary
protected abstract TimestampData readTimestamp(Type type)
readTypeback to summary
public abstract int readType()
readUUIDback to summary
protected abstract BinaryData readUUID()
readYearMonthIntervalback to summary
protected abstract IntervalMonthData readYearMonthInterval(Type type)
resetBlockback to summary
public void resetBlock(long filepos, int rowsize)

Used to reset the row, ready for a new row to be written into the byte[] buffer by an external routine.

resetRowback to summary
public void resetRow(long filepos, int rowsize)

Used to reset the row, ready for a new row to be written into the byte[] buffer by an external routine.

skipBytesback to summary
public int skipBytes(int n)

Overrides org.hsqldb.lib.HsqlByteArrayInputStream.skipBytes.

Implements java.io.DataInput.skipBytes.

Doc from java.io.DataInput.skipBytes.

Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes. However, it may skip over some smaller number of bytes, possibly zero. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. This method never throws an EOFException. The actual number of bytes skipped is returned.