org.hsqldb.rowio
Class RowInputText
- java.lang.Object
-
- java.io.InputStream
-
- org.hsqldb.lib.HsqlByteArrayInputStream
-
- org.hsqldb.rowio.RowInputText
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, RowInputInterface
- Direct Known Subclasses:
- RowInputTextQuoted
public class RowInputText extends HsqlByteArrayInputStream implements RowInputInterface
Class for reading the data for a database row in text table format.- Since:
- 1.7.0
-
-
Constructor Summary
Constructors Constructor and Description RowInputText(java.lang.String fieldSep, java.lang.String varSep, java.lang.String longvarSep, boolean allQuoted)fredt@users - comment - in future may use a custom subclasse of InputStream to read the data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description byte[]getBuffer()intgetLineNumber()longgetPos()intgetSize()java.lang.ObjectreadData(Type type)java.lang.Object[]readData(Type[] colTypes)reads row data from a stream using the JDBC types in colTypesintreadInt()java.lang.StringreadLine()longreadLong()shortreadShort()java.lang.StringreadString()intreadType()voidreset()voidresetBlock(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.voidresetRow(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.voidsetSource(java.lang.String text, long pos, int byteSize)intskipBytes(int n)voidskippedLine()-
Methods inherited from class org.hsqldb.lib.HsqlByteArrayInputStream
available, close, mark, markSupported, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readUnsignedByte, readUnsignedShort, readUTF, skip
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hsqldb.rowio.RowInputInterface
getBuffer, getPos, getSize, readByte, readChar, readData, resetBlock, resetRow
-
-
-
-
Constructor Detail
-
RowInputText
public RowInputText(java.lang.String fieldSep, java.lang.String varSep, java.lang.String longvarSep, boolean allQuoted)fredt@users - comment - in future may use a custom subclasse of InputStream to read the data.
-
-
Method Detail
-
setSource
public void setSource(java.lang.String text, long pos, int byteSize)
-
readString
public java.lang.String readString() throws java.io.IOException- Specified by:
readStringin interfaceRowInputInterface- Throws:
java.io.IOException
-
readShort
public short readShort() throws java.io.IOException- Specified by:
readShortin interfacejava.io.DataInput- Specified by:
readShortin interfaceRowInputInterface- Overrides:
readShortin classHsqlByteArrayInputStream- Throws:
java.io.IOException
-
readInt
public int readInt() throws java.io.IOException- Specified by:
readIntin interfacejava.io.DataInput- Specified by:
readIntin interfaceRowInputInterface- Overrides:
readIntin classHsqlByteArrayInputStream- Throws:
java.io.IOException
-
readLong
public long readLong() throws java.io.IOException- Specified by:
readLongin interfacejava.io.DataInput- Specified by:
readLongin interfaceRowInputInterface- Overrides:
readLongin classHsqlByteArrayInputStream- Throws:
java.io.IOException
-
readType
public int readType() throws java.io.IOException- Specified by:
readTypein interfaceRowInputInterface- Throws:
java.io.IOException
-
getLineNumber
public int getLineNumber()
-
skippedLine
public void skippedLine()
-
reset
public void reset()
- Overrides:
resetin classHsqlByteArrayInputStream
-
getPos
public long getPos()
-
getSize
public int getSize()
-
readData
public java.lang.Object[] readData(Type[] colTypes) throws java.io.IOException
reads row data from a stream using the JDBC types in colTypes- Parameters:
colTypes-- Throws:
java.io.IOException
-
readData
public java.lang.Object readData(Type type) throws java.io.IOException
- Throws:
java.io.IOException
-
resetRow
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.
-
resetBlock
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.
-
getBuffer
public byte[] getBuffer()
-
skipBytes
public int skipBytes(int n) throws java.io.IOException- Specified by:
skipBytesin interfacejava.io.DataInput- Overrides:
skipBytesin classHsqlByteArrayInputStream- Throws:
java.io.IOException
-
readLine
public java.lang.String readLine() throws java.io.IOException- Specified by:
readLinein interfacejava.io.DataInput- Overrides:
readLinein classHsqlByteArrayInputStream- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG