|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.util.ByteArrayWrapper
public class ByteArrayWrapper
A simple utility class to wrap a byte array.
Generally passed as an argument object into a method. The method takes responsibility of writing into the internal byte array and increasing its size when necessary.
Field Summary | |
---|---|
byte[] |
bytes
Deprecated. This is a draft API and might change in a future release of ICU. |
int |
size
Deprecated. This is a draft API and might change in a future release of ICU. |
Constructor Summary | |
---|---|
ByteArrayWrapper()
Deprecated. This is a draft API and might change in a future release of ICU. |
|
ByteArrayWrapper(byte[] bytesToAdopt,
int size)
Deprecated. This is a draft API and might change in a future release of ICU. |
|
ByteArrayWrapper(ByteBuffer source)
Deprecated. This is a draft API and might change in a future release of ICU. |
Method Summary | |
---|---|
ByteArrayWrapper |
append(byte[] src,
int start,
int limit)
Deprecated. This is a draft API and might change in a future release of ICU. |
int |
compareTo(Object other)
Deprecated. This is a draft API and might change in a future release of ICU. |
ByteArrayWrapper |
ensureCapacity(int capacity)
Deprecated. This is a draft API and might change in a future release of ICU. |
boolean |
equals(Object other)
Deprecated. This is a draft API and might change in a future release of ICU. |
int |
hashCode()
Deprecated. This is a draft API and might change in a future release of ICU. |
byte[] |
releaseBytes()
Deprecated. This is a draft API and might change in a future release of ICU. |
ByteArrayWrapper |
set(byte[] src,
int start,
int limit)
Deprecated. This is a draft API and might change in a future release of ICU. |
String |
toString()
Deprecated. This is a draft API and might change in a future release of ICU. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte[] bytes
public int size
Constructor Detail |
---|
public ByteArrayWrapper()
public ByteArrayWrapper(byte[] bytesToAdopt, int size)
bytesToAdopt
- the byte array to adoptsize
- the length of valid data in the byte array
IndexOutOfBoundsException
- if bytesToAdopt == null and size != 0, or
size < 0, or size > bytesToAdopt.length.public ByteArrayWrapper(ByteBuffer source)
source
- the ByteBuffer from which to get the data.Method Detail |
---|
public ByteArrayWrapper ensureCapacity(int capacity)
capacity
- minimum length of internal byte array.
public final ByteArrayWrapper set(byte[] src, int start, int limit)
src
- source byte array to copy fromstart
- start offset of src to copy fromlimit
- end + 1 offset of src to copy from
public final ByteArrayWrapper append(byte[] src, int start, int limit)
src
- source byte array to copy fromstart
- start offset of src to copy fromlimit
- end + 1 offset of src to copy from
public final byte[] releaseBytes()
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
other
- the object to compare to.
public int hashCode()
hashCode
in class Object
public int compareTo(Object other)
compareTo
in interface Comparable
other
- the object to compare to.
ClassCastException
- if the other object is not a ByteArrayWrapper
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |