Package org.h2.store
Class DataReader
- java.lang.Object
-
- java.io.Reader
-
- org.h2.store.DataReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class DataReader extends java.io.ReaderThis class is backed by an input stream and supports reading values and variable size data.
-
-
Constructor Summary
Constructors Constructor Description DataReader(java.io.InputStream in)Create a new data reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread(char[] buff, int off, int len)bytereadByte()Read a byte.intreadVarInt()Read a variable size integer.
-
-
-
Method Detail
-
readByte
public byte readByte() throws java.io.IOExceptionRead a byte.- Returns:
- the byte
- Throws:
java.io.IOException- on failure
-
readVarInt
public int readVarInt() throws java.io.IOExceptionRead a variable size integer.- Returns:
- the value
- Throws:
java.io.IOException- on failure
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Reader- Throws:
java.io.IOException
-
read
public int read(char[] buff, int off, int len) throws java.io.IOException- Specified by:
readin classjava.io.Reader- Throws:
java.io.IOException
-
-