webfunds.sox
Class ItemId

java.lang.Object
  |
  +--webfunds.sox.Encodable
        |
        +--webfunds.sox.Id
              |
              +--webfunds.sox.ItemId

public class ItemId
extends Id

This class represents an Item identifer, which is the standard way of refering to an item.

See Also:
Serialized Form

Fields inherited from class webfunds.sox.Id
id, LEN_MD5, LEN_NAH, LEN_SHA1, MD_MD5, MD_NAH, MD_SHA1
 
Constructor Summary
  ItemId()
           
  ItemId(byte[] data)
          Recover from byte array (not set this byte array).
protected ItemId(Id i)
           
  ItemId(java.io.InputStream is)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
static ItemId example()
          Make and return an example ItemId for testing (other classes).
static void main(java.lang.String[] args)
           
static ItemId newInstance(byte[] txt)
          XXX: this method doesn't really belong in sox as it assumes Ricardian concepts
 java.lang.String toString()
          Convert this object to a string
 
Methods inherited from class webfunds.sox.Id
decode, encode, eq, ex, ex, fp, getByteArray, getBytesFromIdString, getOpenPGPId, hashCode, setByteArray, setOpenPGPId
 
Methods inherited from class webfunds.sox.Encodable
decode, encode, readByteArray, readCertificate, readProperties, readString, writeByteArray, writeCertificate, writeProperties, writeString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ItemId

public ItemId()

ItemId

protected ItemId(Id i)

ItemId

public ItemId(byte[] data)
       throws SOXPacketException
Recover from byte array (not set this byte array).

ItemId

public ItemId(java.io.InputStream is)
       throws java.io.IOException,
              SOXPacketException
Method Detail

newInstance

public static ItemId newInstance(byte[] txt)
                          throws java.io.IOException
XXX: this method doesn't really belong in sox as it assumes Ricardian concepts

toString

public java.lang.String toString()
Convert this object to a string
Overrides:
toString in class Id

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

example

public static ItemId example()
Make and return an example ItemId for testing (other classes). In this case, the ItemId has a valid SHA1 like entry, it is not empty (as there is no context where that makes sense?).

main

public static void main(java.lang.String[] args)