|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.util.buffer.StdReadableImpl
public abstract class StdReadableImpl
A class that implements the decoding routines in ReadableBuffer so that readable only buffer implementations can share it.
Constructor Summary | |
---|---|
StdReadableImpl()
|
Method Summary | |
---|---|
int |
byteDecode()
Decodes an integer stored using the minimal number of bytes. |
int |
byteDecode(int nBytes)
Decodes a postive integer that was coded using a specific number of bytes. |
int |
byteDecode(int pos,
int nBytes)
Decodes a postive integer that was coded using a specific number of bytes from a specific position in the buffer. |
long |
byteDecodeLong()
Decodes a long stored using the byte encoding. |
long |
byteDecodeLong(int nBytes)
Decodes a postive long that was coded using a specific number of bytes. |
long |
byteDecodeLong(int pos,
int nBytes)
Decodes a postive long that was coded using a specific number of bytes from a given position. |
int |
countBits()
Counts the number of bits that are set in a buffer. |
float |
decodeFloat()
Decode a float stored in 4 bytes. |
java.lang.String |
getString()
Gets a string from this buffer. |
int |
skipByteEncoded()
Skips a byte encoded integer without decoding it. |
boolean |
test(int bitIndex)
Tests whether a given bit is true or false. |
java.lang.String |
toString()
Gets a string representation of the bytes in this buffer. |
java.lang.String |
toString(int mode)
Print the bits in the buffer in the order in which they actually occur. |
java.lang.String |
toString(int start,
int end)
Print the bits in the buffer in the order in which they actually occur. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.sun.labs.minion.util.buffer.ReadableBuffer |
---|
duplicate, get, get, slice |
Methods inherited from interface com.sun.labs.minion.util.buffer.Buffer |
---|
limit, limit, position, position, remaining |
Constructor Detail |
---|
public StdReadableImpl()
Method Detail |
---|
public int byteDecode(int nBytes)
byteDecode
in interface ReadableBuffer
nBytes
- The number of bytes to use.
public int byteDecode(int pos, int nBytes)
byteDecode
in interface ReadableBuffer
pos
- The position to decode from.nBytes
- The number of bytes to use.
public long byteDecodeLong(int nBytes)
byteDecodeLong
in interface ReadableBuffer
nBytes
- The number of bytes to use.
public long byteDecodeLong(int pos, int nBytes)
byteDecodeLong
in interface ReadableBuffer
pos
- The position to decode from.nBytes
- The number of bytes to use.
public int byteDecode()
byteDecode
in interface ReadableBuffer
WriteableBuffer.byteEncode(long, int)
public long byteDecodeLong()
byteDecodeLong
in interface ReadableBuffer
WriteableBuffer.byteEncode(long, int)
public int skipByteEncoded()
skipByteEncoded
in interface ReadableBuffer
WriteableBuffer.byteEncode(long, int)
public float decodeFloat()
decodeFloat
in interface ReadableBuffer
public boolean test(int bitIndex)
test
in interface ReadableBuffer
bitIndex
- the index of the bit to test.
public int countBits()
countBits
in interface ReadableBuffer
public java.lang.String getString()
getString
in interface ReadableBuffer
WriteableBuffer.encode(CharSequence)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int mode)
mode
- The type of print out required.
public java.lang.String toString(int start, int end)
start
- The starting position in the buffer from which to
display the bytes.end
- The (exclusive) ending position in the buffer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |