public class ByteBuffer extends Object
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Field and Description |
---|---|
byte[] |
elems
An array holding the bytes in this buffer; can be grown.
|
int |
length
The current number of defined bytes in this buffer.
|
Constructor and Description |
---|
ByteBuffer()
Create a new byte buffer.
|
ByteBuffer(int initialSize)
Create a new byte buffer with an initial elements array
of given size.
|
Modifier and Type | Method and Description |
---|---|
void |
appendByte(int b)
Append byte to this buffer.
|
void |
appendBytes(byte[] bs)
Append all bytes from given byte array.
|
void |
appendBytes(byte[] bs,
int start,
int len)
Append `len' bytes from byte array,
starting at given `start' offset.
|
void |
appendChar(int x)
Append a character as a two byte number.
|
void |
appendDouble(double x)
Append a double as a eight byte number.
|
void |
appendFloat(float x)
Append a float as a four byte number.
|
void |
appendInt(int x)
Append an integer as a four byte number.
|
void |
appendLong(long x)
Append a long as an eight byte number.
|
void |
appendName(Name name)
Append a name.
|
void |
reset()
Reset to zero length.
|
Name |
toName(Names names)
Convert contents to name.
|
public byte[] elems
public int length
public ByteBuffer()
public ByteBuffer(int initialSize)
public void appendByte(int b)
public void appendBytes(byte[] bs, int start, int len)
public void appendBytes(byte[] bs)
public void appendChar(int x)
public void appendInt(int x)
public void appendLong(long x)
public void appendFloat(float x)
public void appendDouble(double x)
public void appendName(Name name)
public void reset()
Copyright © 2017 earcam. All rights reserved.