ePOST API

rice.email
Class EmailData

java.lang.Object
  extended by rice.email.EmailData
All Implemented Interfaces:
java.io.Serializable, PostData

public class EmailData
extends java.lang.Object
implements PostData

Represents the attachment to an email.

Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  byte[] _data
          The data representing the stored data
 
Constructor Summary
EmailData(byte[] data)
          Constructor.
 
Method Summary
 ContentHashReference buildContentHashReference(Id[] location, byte[][] key)
          This method dynamically builds an appropriate HashReference for this type of PostData given a location and key.
 SecureReference buildSecureReference(Id location, byte[] key)
          This method is not supported (you CAN NOT store an emaildata as a secure block).
 SignedReference buildSignedReference(Id location)
          This method dynamically builds an appropriate SignedReference for this type of PostData given a location.
 boolean equals(java.lang.Object o)
          Returns whether or not this EmailData is equal to the object
 byte[] getData()
          Returns the data of this attachment
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_data

protected transient byte[] _data
The data representing the stored data

Constructor Detail

EmailData

public EmailData(byte[] data)
Constructor. Takes in a byte[] representing the data of the attachment

Parameters:
data - The byte[] representation
Method Detail

buildContentHashReference

public ContentHashReference buildContentHashReference(Id[] location,
                                                      byte[][] key)
This method dynamically builds an appropriate HashReference for this type of PostData given a location and key.

Specified by:
buildContentHashReference in interface PostData
Parameters:
location - the location of the data
key - the key of the data
Returns:
A pointer to the data

buildSignedReference

public SignedReference buildSignedReference(Id location)
This method dynamically builds an appropriate SignedReference for this type of PostData given a location.

Specified by:
buildSignedReference in interface PostData
Parameters:
location - the location of the data
Returns:
A pointer to the data
Throws:
java.lang.IllegalArgumentException - Always

buildSecureReference

public SecureReference buildSecureReference(Id location,
                                            byte[] key)
This method is not supported (you CAN NOT store an emaildata as a secure block).

Specified by:
buildSecureReference in interface PostData
Parameters:
location - The location of the data
key - The for the data
Returns:
A pointer to the data
Throws:
java.lang.IllegalArgumentException - Always

getData

public byte[] getData()
Returns the data of this attachment

Returns:
The data stored in this attachment

equals

public boolean equals(java.lang.Object o)
Returns whether or not this EmailData is equal to the object

Overrides:
equals in class java.lang.Object
Returns:
The equality of this and o

ePOST API

Copyright © 2001-2005 - Rice Pastry.