org.basex.io
Class DataInput

java.lang.Object
  extended by org.basex.io.BufferInput
      extended by org.basex.io.DataInput

public final class DataInput
extends BufferInput

This is an input stream for project specific data types.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Constructor Summary
DataInput(java.lang.String db, java.lang.String file)
          Initializes the file reader.
 
Method Summary
 boolean readBool()
          Reads a boolean value from the input stream.
 boolean[] readBooleans()
          Reads a boolean array from the input stream.
 byte[] readBytes()
          Reads a byte array from the input stream.
 byte[][] readBytesArray()
          Reads a double byte array from the input stream.
 int readInt()
          Reads an integer value from the input stream.
 int readNum()
          Reads and decompresses an integer value from the input stream.
 int[] readNums()
          Reads an integer array from the input stream.
 int[] readNums(int s)
          Reads an integer array with the specified size from the input stream.
 int[][] readNumsArray()
          Reads a double byte array from the input stream.
 java.lang.String readString()
          Reads a string from the input stream.
 
Methods inherited from class org.basex.io.BufferInput
close, length, read, readByte, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataInput

public DataInput(java.lang.String db,
                 java.lang.String file)
          throws java.io.IOException
Initializes the file reader.

Parameters:
db - name of the database
file - the file to be read
Throws:
java.io.IOException - IO Exception
Method Detail

readBool

public boolean readBool()
Reads a boolean value from the input stream.

Returns:
boolean value

readBooleans

public boolean[] readBooleans()
Reads a boolean array from the input stream.

Returns:
boolean array

readBytes

public byte[] readBytes()
Reads a byte array from the input stream.

Returns:
byte array

readBytesArray

public byte[][] readBytesArray()
Reads a double byte array from the input stream.

Returns:
double array

readInt

public int readInt()
Reads an integer value from the input stream.

Returns:
integer value

readNum

public int readNum()
Reads and decompresses an integer value from the input stream.

Returns:
read value

readNums

public int[] readNums()
Reads an integer array from the input stream.

Returns:
integer array

readNums

public int[] readNums(int s)
Reads an integer array with the specified size from the input stream.

Parameters:
s - array size
Returns:
integer array

readNumsArray

public int[][] readNumsArray()
Reads a double byte array from the input stream.

Returns:
double array

readString

public java.lang.String readString()
Reads a string from the input stream.

Returns:
string