Top Description Fields Constructors Methods
org.hsqldb.rowio

public Class RowOutputText

extends RowOutputBase
Class Inheritance
Known Direct Subclasses
org.hsqldb.rowio.RowOutputTextQuoted
Imports
java.io.UnsupportedEncodingException, java.math.BigDecimal, org.hsqldb.Row, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.StringConverter, org.hsqldb.persist.TextFileSettings, org.hsqldb.types.BinaryData, .BlobData, .ClobData, .IntervalMonthData, .IntervalSecondData, .JavaObjectData, .TimeData, .TimestampData, .Type, .Types

Class for writing the data for a database row in text table format.
Author
Bob Preston (sqlbob@users dot sourceforge.net)
Since
1.7.0
Version
2.5.0

Field Summary

Modifier and TypeField and Description
protected String
private boolean
protected String
private boolean
private String
private boolean
protected TextFileSettings
protected String
private boolean

Constructor Summary

AccessConstructor and Description
public
RowOutputText(TextFileSettings textFileSettings)

Method Summary

Modifier and TypeMethod and Description
protected String
public RowOutputInterface
private byte[]
public int
public int
private void
public void
public long
public void
public void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
writeByteArray(byte[] b)

public void
public void
writeBytes(String s)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeBytes.

Implements java.io.DataOutput.writeBytes.

Writes a string to the output stream.

protected void
protected void
protected void
protected void
protected void
public void
protected void
public void
writeInt(int i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeInt.

Implements org.hsqldb.rowio.RowOutputInterface.writeInt, java.io.DataOutput.writeInt.

Writes an int value, which is comprised of four bytes, to the output stream.

protected void
public void
writeLong(long i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeLong.

Implements org.hsqldb.rowio.RowOutputInterface.writeLong, java.io.DataOutput.writeLong.

Writes a long value, which is comprised of eight bytes, to the output stream.

protected void
protected void
protected void
protected void
public void
writeShort(int i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeShort.

Implements org.hsqldb.rowio.RowOutputInterface.writeShort, java.io.DataOutput.writeShort.

Writes two bytes to the output stream to represent the value of the argument.

public void
protected void
public void
protected void
protected void
public void
protected void
protected void
protected void
Inherited from org.hsqldb.rowio.RowOutputBase:
getOutputStreamwriteDatawriteDatawriteDatawriteFieldPrefix

Field Detail

fieldSepback to summary
protected String fieldSep
fieldSepEndback to summary
private boolean fieldSepEnd
longvarSepback to summary
protected String longvarSep
longvarSepEndback to summary
private boolean longvarSepEnd
nextSepback to summary
private String nextSep
nextSepEndback to summary
private boolean nextSepEnd
textFileSettingsback to summary
protected TextFileSettings textFileSettings
varSepback to summary
protected String varSep
varSepEndback to summary
private boolean varSepEnd

Constructor Detail

RowOutputTextback to summary
public RowOutputText(TextFileSettings textFileSettings)

Method Detail

checkConvertStringback to summary
protected String checkConvertString(String s, String sep)
duplicateback to summary
public RowOutputInterface duplicate()

Implements abstract org.hsqldb.rowio.RowOutputBase.duplicate.

Implements org.hsqldb.rowio.RowOutputInterface.duplicate.

getBytesback to summary
private byte[] getBytes(String s)
getSizeback to summary
public int getSize(Row row)

Implements org.hsqldb.rowio.RowOutputInterface.getSize.

getStorageSizeback to summary
public int getStorageSize(int size)

Implements org.hsqldb.rowio.RowOutputInterface.getStorageSize.

initTextDatabaseRowOutputback to summary
private void initTextDatabaseRowOutput(TextFileSettings textFileSettings)
resetback to summary
public void reset()

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.reset.

Implements org.hsqldb.rowio.RowOutputInterface.reset.

scaleFilePositionback to summary
public long scaleFilePosition(long pos)

Implements org.hsqldb.rowio.RowOutputInterface.scaleFilePosition.

setModeback to summary
public void setMode(int mode)

Implements org.hsqldb.rowio.RowOutputInterface.setMode.

setStorageSizeback to summary
public void setStorageSize(int size)

Implements org.hsqldb.rowio.RowOutputInterface.setStorageSize.

writeArrayback to summary
protected void writeArray(Object[] o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeArray.

writeBigintback to summary
protected void writeBigint(Number o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeBigint.

writeBinaryback to summary
protected void writeBinary(BinaryData o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeBinary.

writeBitback to summary
protected void writeBit(BinaryData o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeBit.

writeBlobback to summary
protected void writeBlob(BlobData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeBlob.

writeBooleanback to summary
protected void writeBoolean(Boolean o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeBoolean.

writeByteArrayback to summary
protected void writeByteArray(byte[] b)
writeBytesback to summary
public void writeBytes(byte[] b)

Implements org.hsqldb.rowio.RowOutputInterface.writeBytes.

writeBytesback to summary
public void writeBytes(String s)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeBytes.

Implements java.io.DataOutput.writeBytes.

Doc from java.io.DataOutput.writeBytes.

Writes a string to the output stream. For every character in the string s, taken in order, one byte is written to the output stream. If s is null, a NullPointerException is thrown.

If s.length is zero, then no bytes are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, one byte is written, the low-order byte, in exactly the manner of the writeByte method . The high-order eight bits of each character in the string are ignored.

writeCharback to summary
protected void writeChar(String s, Type t)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeChar.

writeClobback to summary
protected void writeClob(ClobData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeClob.

writeDateback to summary
protected void writeDate(TimestampData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeDate.

writeDaySecondIntervalback to summary
protected void writeDaySecondInterval(IntervalSecondData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeDaySecondInterval.

writeDecimalback to summary
protected void writeDecimal(BigDecimal o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeDecimal.

writeEndback to summary
public void writeEnd()

Implements org.hsqldb.rowio.RowOutputInterface.writeEnd.

writeFieldTypeback to summary
protected void writeFieldType(Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeFieldType.

writeIntback to summary
public void writeInt(int i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeInt.

Implements org.hsqldb.rowio.RowOutputInterface.writeInt, java.io.DataOutput.writeInt.

Doc from java.io.DataOutput.writeInt.

Writes an int value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:

(byte)(0xff & (v >> 24))
(byte)(0xff & (v >> 16))
(byte)(0xff & (v >>  8))
(byte)(0xff & v)

The bytes written by this method may be read by the readInt method of interface DataInput, which will then return an int equal to v.

writeIntegerback to summary
protected void writeInteger(Number o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeInteger.

writeLongback to summary
public void writeLong(long i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeLong.

Implements org.hsqldb.rowio.RowOutputInterface.writeLong, java.io.DataOutput.writeLong.

Doc from java.io.DataOutput.writeLong.

Writes a long value, which is comprised of eight bytes, to the output stream. The byte values to be written, in the order shown, are:

(byte)(0xff & (v >> 56))
(byte)(0xff & (v >> 48))
(byte)(0xff & (v >> 40))
(byte)(0xff & (v >> 32))
(byte)(0xff & (v >> 24))
(byte)(0xff & (v >> 16))
(byte)(0xff & (v >>  8))
(byte)(0xff & v)

The bytes written by this method may be read by the readLong method of interface DataInput, which will then return a long equal to v.

writeLongVarStringback to summary
protected void writeLongVarString(String s)
writeNullback to summary
protected void writeNull(Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeNull.

writeOtherback to summary
protected void writeOther(JavaObjectData o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeOther.

writeRealback to summary
protected void writeReal(Double o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeReal.

writeShortback to summary
public void writeShort(int i)

Overrides org.hsqldb.lib.HsqlByteArrayOutputStream.writeShort.

Implements org.hsqldb.rowio.RowOutputInterface.writeShort, java.io.DataOutput.writeShort.

Doc from java.io.DataOutput.writeShort.

Writes two bytes to the output stream to represent the value of the argument. The byte values to be written, in the order shown, are:

(byte)(0xff & (v >> 8))
(byte)(0xff & v)

The bytes written by this method may be read by the readShort method of interface DataInput, which will then return a short equal to (short)v.

writeSizeback to summary
public void writeSize(int size)

Implements org.hsqldb.rowio.RowOutputInterface.writeSize.

writeSmallintback to summary
protected void writeSmallint(Number o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeSmallint.

writeStringback to summary
public void writeString(String s)

Implements org.hsqldb.rowio.RowOutputInterface.writeString.

writeTimeback to summary
protected void writeTime(TimeData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeTime.

writeTimestampback to summary
protected void writeTimestamp(TimestampData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeTimestamp.

writeTypeback to summary
public void writeType(int type)

Implements org.hsqldb.rowio.RowOutputInterface.writeType.

writeUUIDback to summary
protected void writeUUID(BinaryData o)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeUUID.

writeVarStringback to summary
protected void writeVarString(String s)
writeYearMonthIntervalback to summary
protected void writeYearMonthInterval(IntervalMonthData o, Type type)

Implements abstract org.hsqldb.rowio.RowOutputBase.writeYearMonthInterval.