|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VariableByteInput
Interface for reading variable byte encoded values. Variable byte encoding offers a good compression ratio if the stored values are rather small, i.e. much smaller than the possible maximum for the given type.
Method Summary | |
---|---|
int |
available()
Returns a value > 0 if more bytes can be read from the input. |
void |
copyRaw(VariableByteOutputStream os,
int bytes)
|
void |
copyTo(VariableByteOutputStream os)
Copy the next numeric value from the input to the specified output stream. |
void |
copyTo(VariableByteOutputStream os,
int count)
Copy the count next numeric values from the input to the specified output stream. |
int |
read()
Read a single byte and return as an int value. |
int |
read(byte[] data)
Fill the provided byte array with data from the input. |
int |
read(byte[] b,
int off,
int len)
|
byte |
readByte()
Read a single byte. |
int |
readFixedInt()
|
int |
readInt()
Read an integer value in variable byte encoding. |
long |
readLong()
Read a long value in variable byte encoding. |
short |
readShort()
Read a short value in variable byte encoding. |
String |
readUTF()
|
void |
skip(int count)
Read the following count numeric values from the input and drop them. |
void |
skipBytes(long count)
|
Method Detail |
---|
int read() throws IOException
IOException
int read(byte[] data) throws IOException
data
-
IOException
int read(byte[] b, int off, int len) throws IOException
IOException
int available() throws IOException
IOException
byte readByte() throws IOException
IOException
short readShort() throws IOException
IOException
int readInt() throws IOException
IOException
int readFixedInt() throws IOException
IOException
long readLong() throws IOException
IOException
String readUTF() throws IOException, EOFException
IOException
EOFException
void skip(int count) throws IOException
count
-
IOException
void skipBytes(long count) throws IOException
IOException
void copyTo(VariableByteOutputStream os) throws IOException
os
-
IOException
void copyTo(VariableByteOutputStream os, int count) throws IOException
os
- count
-
IOException
void copyRaw(VariableByteOutputStream os, int bytes) throws IOException
IOException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |