org.hsqldb.rowio
Class RowInputText

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.hsqldb.lib.HsqlByteArrayInputStream
          extended byorg.hsqldb.rowio.RowInputBase
              extended byorg.hsqldb.rowio.RowInputText
All Implemented Interfaces:
DataInput, RowInputInterface
Direct Known Subclasses:
RowInputTextQuoted

public class RowInputText
extends RowInputBase
implements RowInputInterface

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

Since:
1.7.0
Version:
1.7.2
Author:
sqlbob@users (RMP)

Field Summary
protected  boolean allQuoted
           
protected  int field
           
protected  int line
           
protected  int next
           
protected  String text
           
 
Fields inherited from class org.hsqldb.rowio.RowInputBase
filePos, makeSystemId, nextPos, size
 
Fields inherited from class org.hsqldb.lib.HsqlByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
RowInputText(String fieldSep, String varSep, String longvarSep, boolean allQuoted)
          fredt@users - comment - in future may use a custom subclasse of InputStream to read the data.
 
Method Summary
protected  boolean checkNull()
           
protected  String getField(String sep, int sepLen, boolean isEnd)
           
 int getLineNumber()
           
protected  Long readBigint()
           
protected  Binary readBinary(int type)
           
protected  Boolean readBit()
           
protected  String readChar(int type)
           
protected  Date readDate()
           
protected  BigDecimal readDecimal()
           
 int readIntData()
           
protected  Integer readInteger()
           
protected  Object readOther()
           
protected  Double readReal(int type)
           
protected  Integer readSmallint()
           
 String readString()
           
protected  Time readTime()
           
protected  Timestamp readTimestamp()
           
 int readType()
           
 void reset()
           
 void setNextPos(int pos)
           
 void setSource(String text, int pos)
           
 void setSource(String text, int pos, int len)
           
 void skippedLine()
           
 
Methods inherited from class org.hsqldb.rowio.RowInputBase
getBuffer, getNextPos, getPos, getSize, newRowInput, readData, readLine, resetRow, setSystemId, skipBytes
 
Methods inherited from class org.hsqldb.lib.HsqlByteArrayInputStream
available, close, mark, markSupported, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skip
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hsqldb.rowio.RowInputInterface
getBuffer, getNextPos, getPos, getSize, readData, resetRow, setSystemId
 

Field Detail

text

protected String text

line

protected int line

field

protected int field

next

protected int next

allQuoted

protected boolean allQuoted
Constructor Detail

RowInputText

public RowInputText(String fieldSep,
                    String varSep,
                    String longvarSep,
                    boolean allQuoted)
fredt@users - comment - in future may use a custom subclasse of InputStream to read the data. author: sqlbob@users (RMP)

Method Detail

setSource

public void setSource(String text,
                      int pos)

setSource

public void setSource(String text,
                      int pos,
                      int len)

getField

protected String getField(String sep,
                          int sepLen,
                          boolean isEnd)
                   throws IOException
Throws:
IOException

readString

public String readString()
                  throws IOException
Specified by:
readString in interface RowInputInterface
Specified by:
readString in class RowInputBase
Throws:
IOException

readIntData

public int readIntData()
                throws IOException
Specified by:
readIntData in interface RowInputInterface
Specified by:
readIntData in class RowInputBase
Throws:
IOException

readType

public int readType()
             throws IOException
Specified by:
readType in interface RowInputInterface
Specified by:
readType in class RowInputBase
Throws:
IOException

checkNull

protected boolean checkNull()
Specified by:
checkNull in class RowInputBase

readChar

protected String readChar(int type)
                   throws IOException
Specified by:
readChar in class RowInputBase
Throws:
IOException

readSmallint

protected Integer readSmallint()
                        throws IOException,
                               HsqlException
Specified by:
readSmallint in class RowInputBase
Throws:
IOException
HsqlException

readInteger

protected Integer readInteger()
                       throws IOException,
                              HsqlException
Specified by:
readInteger in class RowInputBase
Throws:
IOException
HsqlException

readBigint

protected Long readBigint()
                   throws IOException,
                          HsqlException
Specified by:
readBigint in class RowInputBase
Throws:
IOException
HsqlException

readReal

protected Double readReal(int type)
                   throws IOException,
                          HsqlException
Specified by:
readReal in class RowInputBase
Throws:
IOException
HsqlException

readDecimal

protected BigDecimal readDecimal()
                          throws IOException,
                                 HsqlException
Specified by:
readDecimal in class RowInputBase
Throws:
IOException
HsqlException

readTime

protected Time readTime()
                 throws IOException,
                        HsqlException
Specified by:
readTime in class RowInputBase
Throws:
IOException
HsqlException

readDate

protected Date readDate()
                 throws IOException,
                        HsqlException
Specified by:
readDate in class RowInputBase
Throws:
IOException
HsqlException

readTimestamp

protected Timestamp readTimestamp()
                           throws IOException,
                                  HsqlException
Specified by:
readTimestamp in class RowInputBase
Throws:
IOException
HsqlException

readBit

protected Boolean readBit()
                   throws IOException,
                          HsqlException
Specified by:
readBit in class RowInputBase
Throws:
IOException
HsqlException

readOther

protected Object readOther()
                    throws IOException,
                           HsqlException
Specified by:
readOther in class RowInputBase
Throws:
IOException
HsqlException

readBinary

protected Binary readBinary(int type)
                     throws IOException,
                            HsqlException
Specified by:
readBinary in class RowInputBase
Throws:
IOException
HsqlException

getLineNumber

public int getLineNumber()

setNextPos

public void setNextPos(int pos)

skippedLine

public void skippedLine()

reset

public void reset()
Overrides:
reset in class HsqlByteArrayInputStream


Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.