org.arm4.arm40.transaction

Class ArmToken

public class ArmToken extends ArmInterface implements ArmToken

The ARM Token can be used as an identifer for a transaction using a set of given bytes. These bytes can be coupled with metadata from a transaction to provide an identification scheme for business transactions.

Version: $Revision$ $Date$

Author: dcarter

Field Summary
protected static intHASHKEY_MAX
protected intm_hashkey
protected booleanm_hashkeyGenerated
protected byte[]m_tokenData
Constructor Summary
ArmToken(byte[] dataBytes, int offset)
Create an ARM Token.
ArmToken(byte[] dataBytes, int offset, int length)
Create an ARM Token.
Method Summary
protected booleancompare(byte[] reference)
compare two ARM Tokens.
booleancopyBytes(byte[] dest)
booleancopyBytes(byte[] dest, int offset)
protected bytegetByte(int offset)
Get a byte at the offset.
byte[]getBytes()
intgetLength()
inthashCode()

Field Detail

HASHKEY_MAX

protected static final int HASHKEY_MAX

m_hashkey

protected int m_hashkey

m_hashkeyGenerated

protected boolean m_hashkeyGenerated

m_tokenData

protected byte[] m_tokenData

Constructor Detail

ArmToken

public ArmToken(byte[] dataBytes, int offset)
Create an ARM Token.

Parameters: dataBytes offset

ArmToken

public ArmToken(byte[] dataBytes, int offset, int length)
Create an ARM Token.

Parameters: dataBytes offset length

Method Detail

compare

protected boolean compare(byte[] reference)
compare two ARM Tokens.

Parameters: reference

Returns:

copyBytes

public boolean copyBytes(byte[] dest)

copyBytes

public boolean copyBytes(byte[] dest, int offset)

getByte

protected byte getByte(int offset)
Get a byte at the offset.

Parameters: offset

Returns:

getBytes

public byte[] getBytes()

getLength

public int getLength()

hashCode

public int hashCode()