|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.cassandra.io.util.AbstractDataInput
org.apache.cassandra.utils.vint.EncodedDataInputStream
public class EncodedDataInputStream
Borrows idea from https://developers.google.com/protocol-buffers/docs/encoding#varints Should be used with EncodedDataOutputStream
| Constructor Summary | |
|---|---|
EncodedDataInputStream(java.io.DataInput input)
|
|
| Method Summary | |
|---|---|
protected int |
getPosition()
|
int |
read()
|
int |
readInt()
Reads a 32-bit integer from the current position in this file. |
long |
readLong()
Reads a 64-bit long from the current position in this file. |
short |
readShort()
Reads a 16-bit short from the current position in this file. |
int |
readUnsignedShort()
Reads an unsigned 16-bit short from the current position in this file and returns it as an integer. |
protected void |
seekInternal(int position)
|
int |
skipBytes(int n)
|
| Methods inherited from class org.apache.cassandra.io.util.AbstractDataInput |
|---|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readLine, readUnsignedByte, readUTF |
| Methods inherited from class java.io.InputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodedDataInputStream(java.io.DataInput input)
| Method Detail |
|---|
public int skipBytes(int n)
throws java.io.IOException
java.io.IOException
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionprotected void seekInternal(int position)
seekInternal in class AbstractDataInputprotected int getPosition()
getPosition in class AbstractDataInput
public int readInt()
throws java.io.IOException
AbstractDataInput
readInt in interface java.io.DataInputreadInt in class AbstractDataInputjava.io.EOFException - if the end of this file is detected.
java.io.IOException - if this file is closed or another I/O error occurs.
public long readLong()
throws java.io.IOException
AbstractDataInput
readLong in interface java.io.DataInputreadLong in class AbstractDataInputjava.io.EOFException - if the end of this file is detected.
java.io.IOException - if this file is closed or another I/O error occurs.
public int readUnsignedShort()
throws java.io.IOException
AbstractDataInput
readUnsignedShort in interface java.io.DataInputreadUnsignedShort in class AbstractDataInputjava.io.EOFException - if the end of this file is detected.
java.io.IOException - if this file is closed or another I/O error occurs.
public short readShort()
throws java.io.IOException
AbstractDataInput
readShort in interface java.io.DataInputreadShort in class AbstractDataInputjava.io.EOFException - if the end of this file is detected.
java.io.IOException - if this file is closed or another I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||