public class RawBuffer extends Object implements Comparable<RawBuffer>, Cloneable
Constructor and Description |
---|
RawBuffer()
Create an empty buffer.
|
RawBuffer(ArrayList<Byte> buffer)
Create a buffer with initial content.
|
RawBuffer(byte[] bytes)
Create a buffer with initial content.
|
Modifier and Type | Method and Description |
---|---|
RawBuffer |
clone() |
int |
compareTo(RawBuffer rhs) |
boolean |
equals(Object rhs) |
byte[] |
getBytes()
Create a copy of data in the internal buffer.
|
int |
hashCode() |
RawBuffer |
put(byte value)
Insert a byte value into this buffer.
|
RawBuffer |
put(byte[] values)
Insert an array of byte values into this buffer.
|
String |
toString() |
public RawBuffer()
public RawBuffer(ArrayList<Byte> buffer)
buffer
- A buffer of values to be assigned this buffer.public RawBuffer(byte[] bytes)
bytes
- A buffer of bytes to be assigned this buffer.public RawBuffer put(byte value)
value
- The value to add to the buffer.public RawBuffer put(byte[] values)
values
- The array to add to the buffer.public byte[] getBytes()
public int compareTo(RawBuffer rhs)
compareTo
in interface Comparable<RawBuffer>
Copyright © 2018. All rights reserved.