public class ByteArray
extends java.lang.Object
| Constructor and Description |
|---|
ByteArray(byte[] b,
int start,
int count)
Constructor
|
ByteArray(int size)
Constructor that creates a byte array of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Returns the internal byte array.
|
int |
getCount()
Returns the count of bytes
|
byte[] |
getNewBytes()
Returns a new byte array that is a copy of the data.
|
int |
getStart()
Returns the start position
|
void |
grow(int incr)
Grow the byte array by incr bytes.
|
void |
setCount(int count)
Set the count of bytes.
|
java.io.ByteArrayInputStream |
toByteArrayInputStream()
Returns a ByteArrayInputStream.
|
public ByteArray(byte[] b,
int start,
int count)
b - the byte array to wrapstart - start position in byte arraycount - number of bytes in byte arraypublic ByteArray(int size)
size - the size of the ByteArraypublic byte[] getBytes()
public byte[] getNewBytes()
public int getStart()
public int getCount()
public void setCount(int count)
count - the number of bytespublic java.io.ByteArrayInputStream toByteArrayInputStream()
public void grow(int incr)
incr - how much to growCopyright © 2010 - 2023 Adobe. All Rights Reserved