public class ByteBuffer
extends java.lang.Object
Constructor and Description |
---|
ByteBuffer()
ByteBuffer default constructor
|
ByteBuffer(byte[] bytes)
ByteBuffer constructor, get byteArray reference
|
ByteBuffer(int length)
ByteBuffer constructor, allocate buffer when length > 0
|
ByteBuffer(java.lang.String path)
ByteBuffer constructor, get data from external file
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Get byteArray data
|
int |
getLength()
Get data length
|
void |
save(java.lang.String path)
Save byteBuffer data to path input, will overwrite when file already exist.
|
public ByteBuffer()
public ByteBuffer(int length)
length
- Buffer length need to allocatepublic ByteBuffer(byte[] bytes)
bytes
- Source bufferpublic ByteBuffer(java.lang.String path) throws java.io.IOException, ExceptionSet.InvalidParameter
path
- Path of binary filejava.io.IOException
ExceptionSet.InvalidParameter
public byte[] getData()
public int getLength()
public void save(java.lang.String path) throws java.io.IOException, ExceptionSet.InvalidParameter
path
- saving path with file namejava.io.IOException
ExceptionSet.InvalidParameter