org.tranche.logs.activity
Class ActivityLogEntry

java.lang.Object
  extended by org.tranche.logs.activity.ActivityLogEntry
All Implemented Interfaces:
java.io.Serializable

public class ActivityLogEntry
extends java.lang.Object
implements java.io.Serializable

Wrapper class for data that is held in the activity log file.

Author:
Bryan Smith - bryanesmith@gmail.com, James "Augie" Hill - augman85@gmail.com
See Also:
Serialized Form

Field Summary
static int SIZE
           
 
Constructor Summary
ActivityLogEntry(byte[] bytes)
           
ActivityLogEntry(java.io.InputStream in)
           
ActivityLogEntry(long timestamp, byte action, int signatureIndex, BigHash hash)
           
 
Method Summary
protected  void deserialize(java.io.InputStream in)
           
 boolean equals(java.lang.Object o)
           
 byte getAction()
           
 BigHash getHash()
           
 int getSignatureIndex()
           
 long getTimestamp()
           
 int hashCode()
           
protected  void serialize(java.io.OutputStream out)
           
 byte[] toByteArray()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
See Also:
Constant Field Values
Constructor Detail

ActivityLogEntry

public ActivityLogEntry(long timestamp,
                        byte action,
                        int signatureIndex,
                        BigHash hash)
Parameters:
timestamp -
action -
signatureIndex -
hash -

ActivityLogEntry

public ActivityLogEntry(java.io.InputStream in)
                 throws java.io.IOException
Parameters:
in -
Throws:
java.io.IOException

ActivityLogEntry

public ActivityLogEntry(byte[] bytes)
                 throws java.io.IOException
Parameters:
bytes -
Throws:
java.io.IOException
Method Detail

getTimestamp

public long getTimestamp()
Returns:

getAction

public byte getAction()
Returns:

getSignatureIndex

public int getSignatureIndex()
Returns:

getHash

public BigHash getHash()
Returns:

toByteArray

public byte[] toByteArray()
                   throws java.lang.Exception
Returns:
Throws:
java.lang.Exception

serialize

protected void serialize(java.io.OutputStream out)
                  throws java.io.IOException
Parameters:
out -
Throws:
java.io.IOException

deserialize

protected void deserialize(java.io.InputStream in)
                    throws java.io.IOException
Parameters:
in -
Throws:
java.io.IOException

hashCode

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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:


This code is free for use both commercially and non-commercially as stated in the project's license