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

Variable Index

 o data

Constructor Index

 o ByteArray(byte[])
Constructs a ByteArray from a copy of the data in buf.
 o ByteArray(byte[], boolean)
Constructs a ByteArray from data in buf.

Method Index

 o equals(Object)
 o getData()
Returns a copy of this ByteArray's data.
 o hashCode()
 o length()
Returns the length (in bytes) of this ByteArray's data.
 o theSame(byte[], byte[])
Deprecated.
 o toByteArray()
Deprecated.
 o toString()

Variables

 o data
 protected byte data[]

Constructors

 o 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).

 o ByteArray
 public ByteArray(byte buf[])
Constructs a ByteArray from a copy of the data in buf.

Methods

 o length
 public int length()
Returns the length (in bytes) of this ByteArray's data.

 o hashCode
 public int hashCode()
Overrides:
hashCode in class Object
 o equals
 public boolean equals(Object obj)
Overrides:
equals in class Object
 o toString
 public String toString()
Overrides:
toString in class Object
 o getData
 public byte[] getData()
Returns a copy of this ByteArray's data.

 o toByteArray
 public byte[] toByteArray()
Note: toByteArray() is deprecated. Use getData() instead.

 o 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