## org.h2.store
Class DataReader

    java.lang.Object
      org.h2.store.DataReader

    public class DataReader

extends java.lang.Object

This class is backed by an input stream and supports reading values and variable size data.

Constructor Summary
`DataReader(java.io.InputStream in)` Create a new data reader.

Method Summary
`byte` `read()` Read a byte.
`void` `readFully(byte[] buff, int offset, int len)` Read a number of bytes.
`int` `readInt()` Read an integer.
`long` `readLong()` Read a long.
`java.lang.String` `readString()` Read a string from the stream.
`int` `readVarInt()` Read a variable size integer.
`long` `readVarLong()` Read a variable size long.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DataReader

    public DataReader(java.io.InputStream in)

  Create a new data reader.

  Parameters:
    `in` - the input stream

Method Detail

### read

    public byte read()
              throws java.io.IOException

  Read a byte.

  Returns:
    the byte
  Throws:
    `java.io.IOException`

### readVarInt

    public int readVarInt()
                   throws java.io.IOException

  Read a variable size integer.

  Returns:
    the value
  Throws:
    `java.io.IOException`

### readVarLong

    public long readVarLong()
                     throws java.io.IOException

  Read a variable size long.

  Returns:
    the value
  Throws:
    `java.io.IOException`

### readInt

    public int readInt()
                throws java.io.IOException

  Read an integer.

  Returns:
    the value
  Throws:
    `java.io.IOException`

### readLong

    public long readLong()
                  throws java.io.IOException

  Read a long.

  Returns:
    the value
  Throws:
    `java.io.IOException`

### readFully

    public void readFully(byte[] buff,
                          int offset,
                          int len)
                   throws java.io.IOException

  Read a number of bytes.

  Parameters:
    `buff` - the target buffer
    `offset` - the offset within the target buffer
    `len` - the number of bytes to read
  Throws:
    `java.io.IOException`

### readString

    public java.lang.String readString()
                                throws java.io.IOException

  Read a string from the stream.

  Returns:
    the string
  Throws:
    `java.io.IOException`