org.hsqldb.rowio
Class RowOutputBase
java.lang.Object
java.io.OutputStream
org.hsqldb.lib.HsqlByteArrayOutputStream
org.hsqldb.rowio.RowOutputBase
- All Implemented Interfaces:
- DataOutput, RowOutputInterface
- Direct Known Subclasses:
- RowOutputBinary, RowOutputLegacy, RowOutputText, RowOutputTextLog
- public abstract class RowOutputBase
- extends HsqlByteArrayOutputStream
- implements RowOutputInterface
Base class for writing 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.
- Since:
- 1.7.0
- Version:
- 1.7.2
- Author:
- sqlbob@users (RMP), fredt@users
Constructor Summary |
RowOutputBase()
Constructor used for persistent storage of a Table row |
RowOutputBase(byte[] buffer)
Constructor used for network transmission of result sets |
RowOutputBase(int initialSize)
Constructor used for result sets |
Methods inherited from class org.hsqldb.lib.HsqlByteArrayOutputStream |
close, ensureRoom, fill, flush, getBuffer, reset, reset, size, toByteArray, toString, toString, toString, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeTo, writeUTF |
CACHED_ROW_160
public static final int CACHED_ROW_160
- See Also:
- Constant Field Values
CACHED_ROW_170
public static final int CACHED_ROW_170
- See Also:
- Constant Field Values
skipSystemId
protected boolean skipSystemId
RowOutputBase
public RowOutputBase()
- Constructor used for persistent storage of a Table row
- Throws:
IOException
- when an IO error is encountered
RowOutputBase
public RowOutputBase(int initialSize)
- Constructor used for result sets
- Throws:
IOException
- when an IO error is encountered
RowOutputBase
public RowOutputBase(byte[] buffer)
- Constructor used for network transmission of result sets
- Throws:
IOException
- when an IO error is encountered
newRowOutput
public static RowOutputInterface newRowOutput(int cachedRowType)
throws HsqlException
- Throws:
HsqlException
writePos
public abstract void writePos(int pos)
throws IOException
- Specified by:
writePos
in interface RowOutputInterface
- Throws:
IOException
writeSize
public abstract void writeSize(int size)
throws IOException
- Specified by:
writeSize
in interface RowOutputInterface
- Throws:
IOException
writeType
public abstract void writeType(int type)
throws IOException
- Specified by:
writeType
in interface RowOutputInterface
- Throws:
IOException
writeIntData
public abstract void writeIntData(int i)
throws IOException
- Specified by:
writeIntData
in interface RowOutputInterface
- Throws:
IOException
writeIntData
public abstract void writeIntData(int i,
int position)
throws IOException
- Specified by:
writeIntData
in interface RowOutputInterface
- Throws:
IOException
writeString
public abstract void writeString(String s)
throws IOException
- Specified by:
writeString
in interface RowOutputInterface
- Throws:
IOException
writeFieldPrefix
protected void writeFieldPrefix()
throws IOException
- Throws:
IOException
writeFieldType
protected abstract void writeFieldType(int type)
throws IOException
- Throws:
IOException
writeNull
protected abstract void writeNull(int type)
throws IOException
- Throws:
IOException
writeChar
protected abstract void writeChar(String s,
int t)
throws IOException
- Throws:
IOException
writeSmallint
protected abstract void writeSmallint(Number o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeInteger
protected abstract void writeInteger(Number o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeBigint
protected abstract void writeBigint(Number o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeReal
protected abstract void writeReal(Double o,
int type)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeDecimal
protected abstract void writeDecimal(BigDecimal o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeBit
protected abstract void writeBit(Boolean o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeDate
protected abstract void writeDate(Date o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeTime
protected abstract void writeTime(Time o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeTimestamp
protected abstract void writeTimestamp(Timestamp o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeOther
protected abstract void writeOther(JavaObject o)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeBinary
protected abstract void writeBinary(Binary o,
int t)
throws IOException,
HsqlException
- Throws:
IOException
HsqlException
writeData
public void writeData(Object[] data,
Table t)
throws IOException,
HsqlException
- This method is called to write data for a table.
- Specified by:
writeData
in interface RowOutputInterface
- Parameters:
data
- t
-
- Throws:
IOException
HsqlException
writeData
public void writeData(int l,
int[] types,
Object[] data,
HashMappedList cols,
boolean primarykeys)
throws IOException,
HsqlException
- This method is called to write data for a Result.
- Specified by:
writeData
in interface RowOutputInterface
- Parameters:
l
- data
-
- Throws:
IOException
HsqlException
getOutputStream
public HsqlByteArrayOutputStream getOutputStream()
- Specified by:
getOutputStream
in interface RowOutputInterface
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.