Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb
Class TextDatabaseRowOutput  view TextDatabaseRowOutput download TextDatabaseRowOutput.java

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byjava.io.DataOutputStream
              extended byorg.hsqldb.DatabaseRowOutput
                  extended byorg.hsqldb.TextDatabaseRowOutput
All Implemented Interfaces:
DatabaseRowOutputInterface, java.io.DataOutput
Direct Known Subclasses:
QuotedTextDatabaseRowOutput

class TextDatabaseRowOutput
extends DatabaseRowOutput

Class for writing the data for a database row in text table format.

Version:
1.7.0

Field Summary
private  java.io.ByteArrayOutputStream byteOut
           
protected  java.lang.String fieldSep
           
private  boolean fieldSepEnd
           
protected  java.lang.String longvarSep
           
private  boolean longvarSepEnd
           
private  java.lang.String nextSep
           
private  boolean nextSepEnd
           
protected  boolean skipSystemId
           
protected  java.lang.String varSep
           
private  boolean varSepEnd
           
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TextDatabaseRowOutput(java.lang.String fieldSep, java.lang.String varSep, java.lang.String longvarSep)
           
 
Method Summary
 byte[] toByteArray()
           
protected  void writeBigint(java.lang.Number o)
           
protected  void writeBinary(byte[] o, int t)
           
protected  void writeBit(java.lang.Boolean o)
           
protected  void writeByteArray(byte[] b)
           
protected  void writeChar(java.lang.String s, int t)
           
 void writeData(int l, int[] types, java.lang.Object[] data)
          This method is called to write data for a Result
 void writeData(java.lang.Object[] data, Table t)
          This method is called to write data for a table
protected  void writeDate(java.sql.Date o)
           
protected  void writeDecimal(java.math.BigDecimal o)
           
protected  void writeFieldType(int type)
           
 void writeIntData(int i)
           
protected  void writeInteger(java.lang.Number o)
           
protected  void writeLongVarByteArray(byte[] b)
           
private  void writeLongVarNull()
           
protected  void writeLongVarString(java.lang.String s)
           
private  void writeNull()
           
protected  void writeNull(int type)
           
protected  void writeOther(java.lang.Object o)
           
 void writePos(int pos)
           
protected  void writeReal(java.lang.Double o, int type)
           
 void writeSize(int size)
           
protected  void writeSmallint(java.lang.Number o)
           
 void writeString(java.lang.String s)
           
protected  void writeTime(java.sql.Time o)
           
protected  void writeTimestamp(java.sql.Timestamp o)
           
 void writeType(int type)
           
protected  void writeVarByteArray(byte[] b)
           
private  void writeVarNull()
           
protected  void writeVarString(java.lang.String s)
           
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Field Detail

fieldSep

protected java.lang.String fieldSep

varSep

protected java.lang.String varSep

longvarSep

protected java.lang.String longvarSep

fieldSepEnd

private boolean fieldSepEnd

varSepEnd

private boolean varSepEnd

longvarSepEnd

private boolean longvarSepEnd

nextSep

private java.lang.String nextSep

nextSepEnd

private boolean nextSepEnd

byteOut

private java.io.ByteArrayOutputStream byteOut

skipSystemId

protected boolean skipSystemId
Constructor Detail

TextDatabaseRowOutput

public TextDatabaseRowOutput(java.lang.String fieldSep,
                             java.lang.String varSep,
                             java.lang.String longvarSep)
                      throws java.io.IOException
Method Detail

writePos

public void writePos(int pos)
              throws java.io.IOException
Specified by:
writePos in interface DatabaseRowOutputInterface
Specified by:
writePos in class DatabaseRowOutput

writeSize

public void writeSize(int size)
               throws java.io.IOException
Specified by:
writeSize in interface DatabaseRowOutputInterface
Specified by:
writeSize in class DatabaseRowOutput

writeType

public void writeType(int type)
               throws java.io.IOException
Specified by:
writeType in interface DatabaseRowOutputInterface
Specified by:
writeType in class DatabaseRowOutput

writeNull

private void writeNull()
                throws java.io.IOException

writeVarNull

private void writeVarNull()
                   throws java.io.IOException

writeLongVarNull

private void writeLongVarNull()
                       throws java.io.IOException

writeString

public void writeString(java.lang.String s)
                 throws java.io.IOException
Specified by:
writeString in interface DatabaseRowOutputInterface
Specified by:
writeString in class DatabaseRowOutput

writeVarString

protected void writeVarString(java.lang.String s)
                       throws java.io.IOException

writeLongVarString

protected void writeLongVarString(java.lang.String s)
                           throws java.io.IOException

writeByteArray

protected void writeByteArray(byte[] b)
                       throws java.io.IOException

writeVarByteArray

protected void writeVarByteArray(byte[] b)
                          throws java.io.IOException

writeLongVarByteArray

protected void writeLongVarByteArray(byte[] b)
                              throws java.io.IOException

writeIntData

public void writeIntData(int i)
                  throws java.io.IOException
Specified by:
writeIntData in interface DatabaseRowOutputInterface
Specified by:
writeIntData in class DatabaseRowOutput

writeFieldType

protected void writeFieldType(int type)
                       throws java.io.IOException
Specified by:
writeFieldType in class DatabaseRowOutput

writeNull

protected void writeNull(int type)
                  throws java.io.IOException
Specified by:
writeNull in class DatabaseRowOutput

writeChar

protected void writeChar(java.lang.String s,
                         int t)
                  throws java.io.IOException
Specified by:
writeChar in class DatabaseRowOutput

writeSmallint

protected void writeSmallint(java.lang.Number o)
                      throws java.io.IOException,
                             java.sql.SQLException
Specified by:
writeSmallint in class DatabaseRowOutput

writeInteger

protected void writeInteger(java.lang.Number o)
                     throws java.io.IOException,
                            java.sql.SQLException
Specified by:
writeInteger in class DatabaseRowOutput

writeBigint

protected void writeBigint(java.lang.Number o)
                    throws java.io.IOException,
                           java.sql.SQLException
Specified by:
writeBigint in class DatabaseRowOutput

writeReal

protected void writeReal(java.lang.Double o,
                         int type)
                  throws java.io.IOException,
                         java.sql.SQLException
Specified by:
writeReal in class DatabaseRowOutput

writeDecimal

protected void writeDecimal(java.math.BigDecimal o)
                     throws java.io.IOException,
                            java.sql.SQLException
Specified by:
writeDecimal in class DatabaseRowOutput

writeBit

protected void writeBit(java.lang.Boolean o)
                 throws java.io.IOException,
                        java.sql.SQLException
Specified by:
writeBit in class DatabaseRowOutput

writeDate

protected void writeDate(java.sql.Date o)
                  throws java.io.IOException,
                         java.sql.SQLException
Specified by:
writeDate in class DatabaseRowOutput

writeTime

protected void writeTime(java.sql.Time o)
                  throws java.io.IOException,
                         java.sql.SQLException
Specified by:
writeTime in class DatabaseRowOutput

writeTimestamp

protected void writeTimestamp(java.sql.Timestamp o)
                       throws java.io.IOException,
                              java.sql.SQLException
Specified by:
writeTimestamp in class DatabaseRowOutput

writeOther

protected void writeOther(java.lang.Object o)
                   throws java.io.IOException,
                          java.sql.SQLException
Specified by:
writeOther in class DatabaseRowOutput

writeBinary

protected void writeBinary(byte[] o,
                           int t)
                    throws java.io.IOException,
                           java.sql.SQLException
Specified by:
writeBinary in class DatabaseRowOutput

toByteArray

public byte[] toByteArray()
                   throws java.io.IOException

writeData

public void writeData(java.lang.Object[] data,
                      Table t)
               throws java.io.IOException,
                      java.sql.SQLException
This method is called to write data for a table

Specified by:
writeData in interface DatabaseRowOutputInterface

writeData

public void writeData(int l,
                      int[] types,
                      java.lang.Object[] data)
               throws java.io.IOException,
                      java.sql.SQLException
This method is called to write data for a Result

Specified by:
writeData in interface DatabaseRowOutputInterface