OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

opencard.opt.applet
Class ID

java.lang.Object
  |
  +--opencard.opt.applet.ID
Direct Known Subclasses:
AppletID

public class ID
extends java.lang.Object

ID - A wrapper class for unsigned byte arrays which are used as an Identifier.
e.g. ISO 7816-5 Application Identifiers. Universal Identifier GUID

Since:
OCF1.2
Version:
$Id: ID.java,v 1.2 1999/11/23 10:00:58 damke Exp $
See Also:
HexString

Field Summary
protected static java.lang.String[] hexChars
          Auxillary string array.
 
Constructor Summary
protected ID()
          hide this one
  ID(byte[] array)
          construct it with a byte array if your programm has to speed up a bit
  ID(byte pattern, int size)
          construct it with a defined length (size) and fill it with a bytepattern.
  ID(int integer)
          construct it with a integer value.
  ID(java.lang.String hexString)
          construct it with a nice looking friendly String
 
Method Summary
 byte byteValue(int index)
          return the byte with index of byte_array as a byte
 boolean equals(byte[] array)
          Check whether this ID equals another byte[].
 boolean equals(java.lang.Object byteArray)
          Check whether this ID equals another ID.
 byte[] getBytes()
          return the byte_array as byte array
 int hashCode()
           
 int intValue(int index)
          return the byte with index of byte_array as a integer
 java.lang.String toCompactString()
          return the byte_array as String, without seperators between each HexByte
 java.lang.String toString()
          return the byte_array as String, with seperators between each HexByte
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hexChars

protected static final java.lang.String[] hexChars
Auxillary string array.
Constructor Detail

ID

protected ID()
hide this one

ID

public ID(byte[] array)
construct it with a byte array if your programm has to speed up a bit

ID

public ID(byte pattern,
          int size)
construct it with a defined length (size) and fill it with a bytepattern.

ID

public ID(int integer)
construct it with a integer value.

ID

public ID(java.lang.String hexString)
construct it with a nice looking friendly String
Method Detail

byteValue

public byte byteValue(int index)
return the byte with index of byte_array as a byte

getBytes

public byte[] getBytes()
return the byte_array as byte array

intValue

public int intValue(int index)
return the byte with index of byte_array as a integer

toString

public java.lang.String toString()
return the byte_array as String, with seperators between each HexByte
Overrides:
toString in class java.lang.Object

toCompactString

public java.lang.String toCompactString()
return the byte_array as String, without seperators between each HexByte

equals

public boolean equals(byte[] array)
Check whether this ID equals another byte[].

equals

public boolean equals(java.lang.Object byteArray)
Check whether this ID equals another ID.
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object