public class ByteArrayBuffer extends ByteArrayInterface
data, hashBuffer, length, offset| Constructor and Description |
|---|
ByteArrayBuffer(byte[] p_arr) |
| Modifier and Type | Method and Description |
|---|---|
ByteArrayBuffer |
append(byte b)
Append the byte value into this
ByteArrayBuffer |
ByteArrayBuffer |
append(byte[] a) |
ByteArrayBuffer |
append(byte[] a,
int p_offset,
int p_length) |
ByteArrayBuffer |
append(ByteArrayInterface p) |
ByteArrayBuffer |
append(char... str)
append all the chars to this instance of
ByteArrayBuffer |
ByteArrayBuffer |
append(char ch)
append all the chars to this instance of
ByteArray |
ByteArrayBuffer |
append(int n)
Append the integer value as printable characters into this
ByteArrayBuffer |
ByteArrayBuffer |
append(String str)
Append the string value in this
ByteArrayBuffer. |
ByteArrayBuffer |
appendAsHexString(byte[] data,
int offset,
int length)
Append the given byte array as hex char at the end of this
ByteArrayInterface. |
ByteArrayBuffer |
appendRandomHexChars(int length)
Append some random hex char at the end of this
ByteArrayInterface |
ByteArrayBuffer |
copy(byte[] b) |
ByteArrayBuffer |
copy(byte[] p_arr,
int p_offset,
int p_length) |
ByteArrayBuffer |
copy(ByteArrayInterface b) |
ByteArrayBuffer |
copy(String data) |
boolean |
equals(Object obj) |
int |
getLength() |
int |
hashCode() |
void |
reset()
Reset all the parameter of the instance to the initial value, so that it can be reused without any problem.
|
String |
toString() |
equalspublic ByteArrayBuffer copy(ByteArrayInterface b)
public ByteArrayBuffer copy(byte[] b)
copy in class ByteArrayInterfacepublic ByteArrayBuffer copy(byte[] p_arr, int p_offset, int p_length)
copy in class ByteArrayInterfacepublic ByteArrayBuffer copy(String data)
copy in class ByteArrayInterfacepublic void reset()
Reusablereset in interface Reusablereset in class ByteArrayInterfacepublic boolean equals(Object obj)
equals in class ByteArrayInterfacepublic String toString()
toString in class ByteArrayInterfacepublic ByteArrayBuffer append(byte[] a)
append in class ByteArrayInterfacepublic ByteArrayBuffer append(byte[] a, int p_offset, int p_length)
append in class ByteArrayInterfacepublic ByteArrayBuffer append(ByteArrayInterface p)
append in class ByteArrayInterfacepublic ByteArrayBuffer append(int n)
ByteArrayBufferappend in class ByteArrayInterfacen - Integer value to be appendedpublic ByteArrayBuffer append(byte b)
ByteArrayBufferappend in class ByteArrayInterfaceb - byte value to be appendedpublic ByteArrayBuffer append(String str)
ByteArrayBuffer. ASCII byte of each char will be added.append in class ByteArrayInterfacestr - The value to be appended.ByteArrayBufferpublic ByteArrayBuffer append(char ch)
ByteArrayappend in class ByteArrayInterfacech - char to be appended into this instance.ByteArraypublic ByteArrayBuffer append(char... str)
ByteArrayBufferappend in class ByteArrayInterfacestr - multiple chars to be appended into this instance.ByteArrayBufferpublic ByteArrayBuffer appendRandomHexChars(int length)
ByteArrayInterfaceappendRandomHexChars in class ByteArrayInterfacelength - Number of hex char to be added.ByteArrayInterfacepublic ByteArrayBuffer appendAsHexString(byte[] data, int offset, int length)
ByteArrayInterface.
For example if the given byte [] contains word 'hello' into it,
the byte array data = {68, 65, 6c, 6c, 6f}
after calling this method it will append '68656c6f' at the end of this ByteArrayInterface
so after adding this instance will contain data = {36 38 36 35 36 63 36 63 36 66}appendAsHexString in class ByteArrayInterfacedata - byte array whose data will be appended as hex string.offset - starting index of byte [] to be appended into thislength - length of the given byte array to be appended as hex string.ByteArrayInterfacepublic int getLength()
getLength in class ByteArrayInterfaceCopyright © 2023. All rights reserved.