public class ByteArray extends Object
| Constructor and Description |
|---|
ByteArray(byte[] buffer)
Create a byte array that spans the entire length of the given array.
|
ByteArray(byte[] buffer,
int offset,
int length)
Create a byte array that spans the reference array length bytes
from the offset.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asBytes()
Returns a deep copy of the data in the byte array with the offset
justified to zero.
|
boolean |
equals(Object obj) |
byte[] |
getBuffer()
Get the reference backing array.
|
int |
getLength()
Get the length of the data in the backing array.
|
int |
getOffset()
Get the offset of the data in the backing array.
|
int |
hashCode() |
String |
toString() |
public ByteArray(byte[] buffer)
buffer - Reference byte[]public ByteArray(byte[] buffer,
int offset,
int length)
buffer - Reference byte[]offset - Offset to start of datalength - Length of the data from the offsetpublic byte[] getBuffer()
public int getLength()
public int getOffset()
public byte[] asBytes()
Copyright 2004-2020 Solace Corporation. All rights reserved.