org.hsqldb.rowio
Class RowInputBinary
- java.lang.Object
-
- java.io.InputStream
-
- org.hsqldb.lib.HsqlByteArrayInputStream
-
- org.hsqldb.rowio.RowInputBinary
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, RowInputInterface
- Direct Known Subclasses:
- RowInputBinary180, RowInputBinaryDecode
public class RowInputBinary extends HsqlByteArrayInputStream implements RowInputInterface
Provides methods for reading the data for a row from a byte array. The format of data is that used for storage of cached tables by v.1.6.x databases, apart from strings.- Since:
- 1.7.0
-
-
Field Summary
Fields Modifier and Type Field and Description booleanignoreDataErrors
-
Constructor Summary
Constructors Constructor and Description RowInputBinary(byte[] buf)RowInputBinary(RowOutputBinary out)uses the byte[] buffer from out.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description byte[]getBuffer()longgetPos()intgetSize()byte[]readByteArray()char[]readCharArray()java.lang.ObjectreadData(Type type)java.lang.Object[]readData(Type[] colTypes)reads row data from a stream using the JDBC types in colTypesint[]readIntArray()Nulls in array are treated as 0java.lang.StringreadLine()booleanreadNull()java.lang.StringreadString()intreadType()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(int rowsize)Used to reset the row, ready for Result data 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 db row to be written into the byte[] buffer by an external routine.intskipBytes(int n)-
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, reset, 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, readInt, readLong, readShort, resetBlock
-
-
-
-
Constructor Detail
-
RowInputBinary
public RowInputBinary(byte[] buf)
-
RowInputBinary
public RowInputBinary(RowOutputBinary out)
uses the byte[] buffer from out. At each reset, the buffer is set to the current one for out.
-
-
Method Detail
-
readType
public int readType() throws java.io.IOException- Specified by:
readTypein interfaceRowInputInterface- Throws:
java.io.IOException
-
readString
public java.lang.String readString() throws java.io.IOException- Specified by:
readStringin interfaceRowInputInterface- Throws:
java.io.IOException
-
readNull
public boolean readNull() throws java.io.IOException- Throws:
java.io.IOException
-
readIntArray
public int[] readIntArray() throws java.io.IOExceptionNulls in array are treated as 0- Throws:
java.io.IOException
-
readData
public java.lang.Object[] readData(Type[] colTypes) throws java.io.IOException
reads row data from a stream using the JDBC types in colTypes- Specified by:
readDatain interfaceRowInputInterface- Throws:
java.io.IOException
-
readByteArray
public byte[] readByteArray() throws java.io.IOException- Throws:
java.io.IOException
-
readCharArray
public char[] readCharArray() throws java.io.IOException- Throws:
java.io.IOException
-
resetRow
public void resetRow(int rowsize)
Used to reset the row, ready for Result data to be written into the byte[] buffer by an external routine.
-
resetRow
public void resetRow(long filepos, int rowsize)Used to reset the row, ready for a new db row to be written into the byte[] buffer by an external routine.- Specified by:
resetRowin interfaceRowInputInterface
-
getPos
public long getPos()
-
getSize
public int getSize()
-
readData
public java.lang.Object readData(Type type) throws java.io.IOException
- Throws:
java.io.IOException
-
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