Package com.reve.utils.bytearray
Class ByteArrayInterface
java.lang.Object
com.reve.utils.bytearray.ByteArrayInterface
- All Implemented Interfaces:
Reusable
- Direct Known Subclasses:
ByteArray,ByteArrayBuffer
Title:
Description:
Copyright: Copyright (c) 2009
Company:
- Version:
- 1.0
- Author:
- not attributable
-
Field Summary
FieldsModifier and TypeFieldDescriptionbyte[]Container of information.protected int[]Contains the calculated hash code of this instance.intCurrent length of this byte array.intOffset of this byte array. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ByteArrayInterfaceappend(byte b) abstract ByteArrayInterfaceappend(byte[] a) abstract ByteArrayInterfaceappend(byte[] a, int p_offset, int p_length) abstract ByteArrayInterfaceappend(char ch) abstract ByteArrayInterfaceappend(char... str) abstract ByteArrayInterfaceappend(int n) abstract ByteArrayInterfaceabstract ByteArrayInterfaceabstract ByteArrayInterfaceappendAsHexString(byte[] data, int offset, int length) abstract ByteArrayInterfaceappendRandomHexChars(int length) abstract ByteArrayInterfacecopy(byte[] a) abstract ByteArrayInterfacecopy(byte[] a, int p_offset, int p_length) abstract ByteArrayInterfacebooleanequals(byte[] data, int offset, int length) Check if the given byte array is equal to this instance or not.booleanabstract intabstract voidreset()Reset all the parameter of the instance to the initial value, so that it can be reused without any problem.abstract StringtoString()
-
Field Details
-
data
public byte[] dataContainer of information. -
offset
public int offsetOffset of this byte array. -
length
public int lengthCurrent length of this byte array. -
hashBuffer
protected int[] hashBufferContains the calculated hash code of this instance.
-
-
Constructor Details
-
ByteArrayInterface
public ByteArrayInterface()
-
-
Method Details
-
copy
-
copy
-
copy
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
append
-
appendRandomHexChars
-
appendAsHexString
-
getLength
public abstract int getLength() -
toString
-
reset
public abstract void reset()Description copied from interface:ReusableReset all the parameter of the instance to the initial value, so that it can be reused without any problem. -
equals
-
equals
public boolean equals(byte[] data, int offset, int length) Check if the given byte array is equal to this instance or not.
-