|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.hawtbuf.AbstractVarIntSupport
public abstract class AbstractVarIntSupport
| Constructor Summary | |
|---|---|
AbstractVarIntSupport()
|
|
| Method Summary | |
|---|---|
static int |
computeVarIntSize(int value)
Compute the number of bytes that would be needed to encode a varint. |
static int |
computeVarLongSize(long value)
Compute the number of bytes that would be needed to encode a varint. |
static int |
computeVarSignedIntSize(int value)
Compute the number of bytes that would be needed to encode a signed varint. |
static int |
computeVarSignedLongSize(long value)
Compute the number of bytes that would be needed to encode a signed varint. |
protected abstract byte |
readByte()
|
int |
readVarInt()
Read a raw Varint from the stream. |
long |
readVarLong()
Read a raw Varint from the stream. |
int |
readVarSignedInt()
Read an sint32 field value from the stream. |
long |
readVarSignedLong()
Read an sint64 field value from the stream. |
protected abstract void |
writeByte(int value)
|
void |
writeVarInt(int value)
Encode and write a varint. |
void |
writeVarLong(long value)
Encode and write a varint. |
void |
writeVarSignedInt(int value)
|
void |
writeVarSignedLong(long value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractVarIntSupport()
| Method Detail |
|---|
protected abstract byte readByte()
throws java.io.IOException
java.io.IOException
protected abstract void writeByte(int value)
throws java.io.IOException
java.io.IOException
public int readVarInt()
throws java.io.IOException
java.io.IOException
public long readVarLong()
throws java.io.IOException
java.io.IOException
public int readVarSignedInt()
throws java.io.IOException
sint32 field value from the stream.
java.io.IOException
public long readVarSignedLong()
throws java.io.IOException
sint64 field value from the stream.
java.io.IOException
public void writeVarInt(int value)
throws java.io.IOException
value is treated as unsigned, so it
won't be sign-extended if negative.
java.io.IOException
public void writeVarLong(long value)
throws java.io.IOException
java.io.IOException
public void writeVarSignedInt(int value)
throws java.io.IOException
java.io.IOException
public void writeVarSignedLong(long value)
throws java.io.IOException
java.io.IOExceptionpublic static int computeVarIntSize(int value)
value is treated as unsigned, so it won't be sign-extended if
negative.
public static int computeVarLongSize(long value)
public static int computeVarSignedIntSize(int value)
public static int computeVarSignedLongSize(long value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||