|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectequip.runtime.Mbuf
message(byte) buffer used by MbufInputStream and
MbufOutputStream.
NB be careful not to re-use in parallel if making use of ref
counting.
| Field Summary | |
protected byte[] |
buf
internal buffer |
static int |
DEFAULT_SIZE
Default buffer size (1000) |
protected int |
headerSize
amount of internal buffer allocated to header space |
protected Mbuf |
next
pointer to next Mbuf in single linked list |
protected int |
size
total size of internal buffer in use |
protected int |
used
amount of internal buffer in use |
| Constructor Summary | |
Mbuf()
initialise to DEFAULT_SIZE and no header |
|
Mbuf(int size,
int headerSize)
initialise to specified total and header size. |
|
| Method Summary | |
byte[] |
getBuf()
get reference to internal buffer. |
int |
getHeaderSize()
get size of buffer header space. |
Mbuf |
getNext()
single linked list. |
int |
getSize()
get total size of buffer. |
int |
getUsed()
get number of bytes in use. |
void |
setData(byte[] b,
int length)
set internal buffer |
void |
setHeaderSize(int size)
set size of buffer header space. |
void |
setNext(Mbuf next)
set next buffer in single linked list. |
void |
setUsed(int used)
set number of bytes in use. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_SIZE
protected byte[] buf
protected int used
protected int size
protected int headerSize
protected Mbuf next
Mbuf in single linked list
| Constructor Detail |
public Mbuf()
DEFAULT_SIZE and no header
public Mbuf(int size,
int headerSize)
size - Total size of buffer.headerSize - Amount of buffer to be allocated as header| Method Detail |
public Mbuf getNext()
public void setNext(Mbuf next)
next - Next buffer in single linked list.public int getUsed()
public void setUsed(int used)
used - Number of bytes now used.public int getSize()
public byte[] getBuf()
public int getHeaderSize()
public void setHeaderSize(int size)
size - New amount of buffer to be allocated as header.
public void setData(byte[] b,
int length)
length - amount of buffer used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||