public class ByteArrayWindow
extends java.lang.Object
ByteArrayWindow provides windowed access to a subarray
of a byte array.| Modifier and Type | Field and Description |
|---|---|
private int |
length |
private int |
offset |
private byte[] |
value |
| Constructor and Description |
|---|
ByteArrayWindow(byte[] value,
int offset,
int length)
Creates a byte array window that provides access to the bytes in the
supplied array between the position starting at the supplied offset.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(ByteArrayWindow other,
int maxBytesToCompare) |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
byte |
get(int i) |
int |
getLength() |
int |
getOffset() |
byte[] |
getValue() |
void |
set(int i,
byte b) |
void |
setValue(byte[] value) |
public ByteArrayWindow(byte[] value,
int offset,
int length)
value - the underlying byte array.offset - the starting position of the created window.length - the length of the window.public byte[] getValue()
public void setValue(byte[] value)
public int getOffset()
public void set(int i,
byte b)
public byte get(int i)
public int getLength()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.true if this object is the same as the obj argument;
false otherwise.public boolean equals(ByteArrayWindow other, int maxBytesToCompare)