|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jbase.jremote.io.PrefixByteBuffer
public class PrefixByteBuffer
Field Summary | |
---|---|
static int |
CHUNK_SIZE
|
Constructor Summary | |
---|---|
PrefixByteBuffer()
|
Method Summary | |
---|---|
void |
clear()
Method: clear() Description: Reset buffer to its empty state. |
void |
flip()
Method: flip() Description: Similar the ByteBuffer.flip() but the position must be set back to the start of the prefix. |
byte[] |
getBackingArray()
Method: getBackingArray() Description: Returns a pointer to the backing array Note: DANGEROUS. |
byte |
getByte()
|
void |
getBytes(byte[] buf)
|
void |
getBytes(ByteBuffer bBuf)
|
int |
getInt()
|
int |
getStartOffset()
|
String |
getUTF8()
|
int |
length()
|
void |
pushByte(int b)
Write bytes to start methods |
void |
pushBytes(byte[] b)
|
void |
pushInt(int v)
|
void |
putByte(int b)
Write bytes to end methods |
void |
putBytes(byte[] b)
|
void |
putInt(int v)
|
void |
putUTF8(String s)
|
void |
readFrom(ByteBuffer buf)
Method: readFrom() Description: Read a BufferBuffer into self as if it had been received from an InputStream. |
void |
readFrom(InputStream is,
int length)
Method: readFrom() Description: Reads a given number of bytes from a given input stream. |
void |
writeTo(ByteBuffer buf)
|
void |
writeTo(OutputStream os)
Method: writeTo() Description: Write data to a given OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CHUNK_SIZE
Constructor Detail |
---|
public PrefixByteBuffer()
Method Detail |
---|
public int length()
public void flip()
public void clear()
public void writeTo(OutputStream os) throws IOException
IOException
public void writeTo(ByteBuffer buf)
public void readFrom(InputStream is, int length) throws IOException
IOException
public void readFrom(ByteBuffer buf)
public byte[] getBackingArray()
public int getStartOffset()
public void putByte(int b)
public void putBytes(byte[] b)
public void putUTF8(String s) throws IOException
IOException
public void putInt(int v)
public void pushByte(int b) throws BufferOverflowException
BufferOverflowException
public void pushBytes(byte[] b) throws BufferOverflowException
BufferOverflowException
public void pushInt(int v)
public byte getByte()
public int getInt()
public void getBytes(byte[] buf)
public void getBytes(ByteBuffer bBuf)
public String getUTF8() throws IOException
IOException
|
jremote jbase5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |