|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.model.Attachment
An NNTP Message attachment.
Field Summary | |
static java.lang.String |
XML_DATA
XML tag for data property. |
static java.lang.String |
XML_NAME
XML tag for name property. |
static java.lang.String |
XML_TAG
XML tag for serialization. |
Constructor Summary | |
protected |
Attachment()
Creates a new Attachment object. |
|
Attachment(java.lang.String name,
java.lang.String data)
Creates a new Attachment object. |
Method Summary | |
byte[] |
decode()
Decodes and returns the data for this attachment. |
static Attachment |
encode(java.io.File file)
Encodes a file to an Attachment. |
java.lang.String |
getData()
Gets the Base64 encoded data of this attachment. |
java.lang.String |
getName()
Gets the name of this attachment. |
java.lang.String |
getUUEData()
Returns this Attachment as a UUEncoded document. |
protected void |
setData(java.lang.String data)
Sets the Base64 encoded data of this attachment. |
protected void |
setName(java.lang.String name)
Sets the name of this attachment. |
java.lang.String |
toString()
Returns a String representation of this attachment. |
org.dom4j.Document |
toXML()
Converts an object into an XML Document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_TAG
public static final java.lang.String XML_NAME
public static final java.lang.String XML_DATA
Constructor Detail |
public Attachment(java.lang.String name, java.lang.String data)
name
- The name of the attachment.data
- The Base64 encoded data.protected Attachment()
Method Detail |
public java.lang.String getName()
protected void setName(java.lang.String name)
name
- The name.public java.lang.String getData()
protected void setData(java.lang.String data)
data
- The Base64 encoded data.public java.lang.String getUUEData()
public byte[] decode()
public static Attachment encode(java.io.File file)
file
- The file to encode.
public org.dom4j.Document toXML()
toXML
in interface XMLSerializable
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |