public class RMByteArray extends RMObject implements java.io.Serializable
Constructor and Description |
---|
RMByteArray()
Creates an empty RMData.
|
RMByteArray(byte[] theBytes)
Creates an RMData with the given byte array.
|
RMByteArray(byte[] theBytes,
int aLength)
Creates an RMData with the given byte array (only to the given length).
|
RMByteArray(int aCapacity)
Creates an empty RMData with the given capacity.
|
Modifier and Type | Method and Description |
---|---|
RMByteArray |
append(byte[] bytes)
Appends raw binary from byte array to data.
|
RMByteArray |
append(byte[] bytes,
int offset,
int length)
Appends raw binary from byte array to data.
|
RMByteArray |
append(char c)
Append common types as ASCII.
|
RMByteArray |
append(char[] str)
Append the given char array.
|
RMByteArray |
append(char[] str,
int offset,
int length)
Appends the given char array.
|
RMByteArray |
append(double d)
Appends the given double.
|
RMByteArray |
append(float f)
Appends the given float.
|
RMByteArray |
append(int anInt)
Appends an int string to the data.
|
RMByteArray |
append(java.lang.Object o)
Appends an object's string representation to the data.
|
RMByteArray |
append(RMByteArray data)
Appends raw binary from given data to data.
|
RMByteArray |
append(java.lang.String aString)
Appends a string to the data.
|
void |
appendByte(int aByte)
Appends byte to data.
|
void |
appendInt(int anInt)
Appends int to data.
|
void |
appendLittleInt(int anInt)
Appends little endian int to data.
|
void |
appendLittleShort(int aShortInt)
Appends little endian short to data.
|
void |
appendLittleUInt(long aUInt)
Appends little endian unsigned int to data.
|
void |
appendLittleUShort(int aShort)
Appends little endian unsigned short to data.
|
void |
appendShort(int aShortInt)
Appends short to data.
|
void |
appendUByte(int aByte)
Appends unsigned byte to data.
|
short[] |
bigShortArrayAt(int index,
int len)
Returns the array of big endian shorts at the given byte index with the given length.
|
short |
bigShortAtIndex(int index)
Returns the short at the given index (assumed to be in big endian format).
|
long |
bigUIntAtIndex(int index)
Returns the big endian unsigned int at the given byte index.
|
int[] |
bigUShortArrayAt(int index,
int len)
Returns the array of big endian unsigned shorts at the given byte index with the given length.
|
int |
bigUShortAtIndex(int index)
Returns the big endian unsigned short at the given byte index.
|
char[] |
charArrayAt(int index,
int len)
Returns the char array at the given byte index with the given length.
|
java.lang.Object |
clone()
Standard clone implementation.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
void |
flateCompressedData()
Flate compresses data.
|
byte |
getByte(int index)
Returns the specific byte at the given index.
|
byte[] |
getBytes()
Returns the bytes in the data.
|
void |
getBytes(int srcBegin,
int srcEnd,
byte[] destBytes)
Copies the bytes from this data to the given byte array.
|
void |
getBytes(int srcBegin,
int srcEnd,
byte[] destBytes,
int destBegin)
Copies the bytes from this data to the given byte array.
|
int |
getCapacity()
Returns the size of the internal byte array.
|
java.io.InputStream |
getInputStream()
Returns an input stream of this data's bytes.
|
void |
insert(int index,
byte[] bytes)
Inserts raw binary from byte array to data.
|
void |
insert(int index,
byte[] bytes,
int offset,
int length)
Inserts raw binary from byte array to data.
|
void |
insert(int index,
RMByteArray data)
Inserts raw binary from given data to data.
|
void |
insertLittleUIntAtIndex(long aUInt,
int byteIndex)
Inserts little endian unsigned int to data at given index.
|
int |
length()
Returns the length of the data.
|
short |
littleShortAtIndex(int index)
Returns the little endian short at the given byte index.
|
long |
littleUIntAtIndex(int index)
Returns the little endian unsigned int at the given byte index.
|
int |
littleUShortAtIndex(int index)
Returns the little endian unsigned short at the given byte index.
|
void |
replace(int start,
int end,
byte[] bytes,
int offset,
int length)
Replace raw binary from byte array in data.
|
void |
setCapacity(int aMinimumCapacity)
Makes sure internal byte array is at least a given size.
|
void |
setLittleIntAtIndex(int anInt,
int byteIndex)
Sets little endian int to data at given index.
|
void |
setLittleShortAtIndex(int aShortInt,
int byteIndex)
Sets little endian short to data at given index.
|
void |
setLittleUShortAtIndex(int aShort,
int byteIndex)
Sets little endian unsigned short to data at given index.
|
byte[] |
toByteArray()
Returns a byte array for the bytes in the data.
|
byte[] |
toByteArray(int start,
int end)
Returns a byte array for the bytes in the data.
|
java.lang.String |
toString()
Returns the string initialized from the data's bytes (ISO Latin).
|
java.lang.String |
toString(int start,
int end,
java.lang.String encoding)
Returns the string initialized from the data's bytes in the given encoding.
|
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
public RMByteArray()
public RMByteArray(int aCapacity)
public RMByteArray(byte[] theBytes)
public RMByteArray(byte[] theBytes, int aLength)
public byte[] getBytes()
public int length()
public byte getByte(int index)
public void getBytes(int srcBegin, int srcEnd, byte[] destBytes)
public void getBytes(int srcBegin, int srcEnd, byte[] destBytes, int destBegin)
public java.io.InputStream getInputStream()
public RMByteArray append(char c)
public RMByteArray append(char[] str)
public RMByteArray append(char[] str, int offset, int length)
public RMByteArray append(double d)
public RMByteArray append(float f)
public RMByteArray append(int anInt)
public RMByteArray append(java.lang.Object o)
public RMByteArray append(java.lang.String aString)
public RMByteArray append(RMByteArray data)
public RMByteArray append(byte[] bytes)
public RMByteArray append(byte[] bytes, int offset, int length)
public void insert(int index, RMByteArray data)
public void insert(int index, byte[] bytes)
public void insert(int index, byte[] bytes, int offset, int length)
public void replace(int start, int end, byte[] bytes, int offset, int length)
public void appendByte(int aByte)
public void appendUByte(int aByte)
public void appendShort(int aShortInt)
public void appendLittleShort(int aShortInt)
public void appendLittleUShort(int aShort)
public void appendInt(int anInt)
public void appendLittleInt(int anInt)
public void appendLittleUInt(long aUInt)
public void setLittleShortAtIndex(int aShortInt, int byteIndex)
public void setLittleUShortAtIndex(int aShort, int byteIndex)
public void setLittleIntAtIndex(int anInt, int byteIndex)
public void insertLittleUIntAtIndex(long aUInt, int byteIndex)
public short bigShortAtIndex(int index)
public int bigUShortAtIndex(int index)
public short littleShortAtIndex(int index)
public int littleUShortAtIndex(int index)
public long bigUIntAtIndex(int index)
public long littleUIntAtIndex(int index)
public char[] charArrayAt(int index, int len)
public short[] bigShortArrayAt(int index, int len)
public int[] bigUShortArrayAt(int index, int len)
public int getCapacity()
public void setCapacity(int aMinimumCapacity)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class RMListenerList
public java.lang.String toString()
public java.lang.String toString(int start, int end, java.lang.String encoding)
public byte[] toByteArray()
public byte[] toByteArray(int start, int end)
public void flateCompressedData()