All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.util.ByteArray
java.lang.Object
|
+----cryptix.util.ByteArray
- public class ByteArray
- extends Object
A class that represents a byte array.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.2 $
- Author:
- Jill Baker
-
data
-
-
ByteArray(byte[])
- Constructs a ByteArray from a copy of the data in buf.
-
ByteArray(byte[], boolean)
- Constructs a ByteArray from data in buf.
-
equals(Object)
-
-
getData()
- Returns a copy of this ByteArray's data.
-
hashCode()
-
-
length()
- Returns the length (in bytes) of this ByteArray's data.
-
theSame(byte[], byte[])
-
Deprecated.
-
toByteArray()
-
Deprecated.
-
toString()
-
data
protected byte data[]
ByteArray
public ByteArray(byte buf[],
boolean copy)
- Constructs a ByteArray from data in buf. If copy is true,
the data will be copied. Otherwise, buf will be aliased.
To construct a ByteArray from a String using ISO-Latin-1 encoding, use
new ByteArray(LegacyString.toByteArray(str), false)
.
ByteArray
public ByteArray(byte buf[])
- Constructs a ByteArray from a copy of the data in buf.
length
public int length()
- Returns the length (in bytes) of this ByteArray's data.
hashCode
public int hashCode()
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
- equals in class Object
toString
public String toString()
- Overrides:
- toString in class Object
getData
public byte[] getData()
- Returns a copy of this ByteArray's data.
toByteArray
public byte[] toByteArray()
- Note: toByteArray() is deprecated.
Use
getData()
instead.
theSame
public static boolean theSame(byte a[],
byte b[])
- Note: theSame() is deprecated.
Use
ArrayUtil.areEqual(a, b)
instead.
All Packages Class Hierarchy This Package Previous Next Index