public class ByteBuffer extends ByteArrayOutputStream
buf, count
Constructor and Description |
---|
ByteBuffer(int size)
The constructor for ByteBuffer, specifying the size,
in bytes, of the byteBuffer.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getByteArray()
Returns the byte array.
|
String |
getString()
Gets the buffer contents.
|
int |
length()
Returns the length of the byte buffer.
|
void |
reset() |
void |
setString(String str)
Sets the buffer contents.
|
close, size, toByteArray, toString, toString, toString, write, write, writeTo
flush, write
public ByteBuffer(int size)
size
- a int.public byte[] getByteArray()
public void setString(String str) throws IOException
str
- The string to set.IOException
- if any.public String getString() throws IOException
IOException
- if any.public int length()
public void reset()
reset
in class ByteArrayOutputStream
Copyright © 2003–2015 Atan. All rights reserved.