|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.jxta.endpoint.NewMessageElement
A Message is composed of MessageElements. An MessageElement has an optional name, an optional type (which defaults to "Application/Octet-stream"), a body and an optional digest/digital signature.
| Field Summary | |
protected java.lang.String |
name
Deprecated. The name of this element. |
protected java.util.HashMap |
properties
Deprecated. message properties hashmap |
protected NewMessageElement |
sig
Deprecated. The optional element which digitially signs or digests this element. |
protected MimeMediaType |
type
Deprecated. The type of this element. |
| Constructor Summary | |
protected |
NewMessageElement(java.lang.String name,
MimeMediaType type,
NewMessageElement sig)
Deprecated. Internal constructor for initializaing everything but the data. |
| Method Summary | |
java.lang.Object |
clone()
Deprecated. make a clone of this element. |
boolean |
equals(java.lang.Object target)
Deprecated. Compare this MessageElement against another |
abstract long |
getByteLength()
Deprecated. Returns the size of the element data in bytes. |
java.lang.String |
getFileExtension()
Deprecated. Return the file extension to use for this document. |
java.lang.Object |
getMessageProperty(java.lang.Object key)
Deprecated. retrieves a transient property from the set for this message. |
MimeMediaType |
getMimeType()
Deprecated. Returns the type of the MessageElement. |
java.lang.String |
getName()
Deprecated. Returns the name of the MessageElement. |
static java.lang.String |
getSequentialName()
Deprecated. Returns a string containing a pseudo-random unique string and an integer value. |
NewMessageElement |
getSignature()
Deprecated. Returns the element containing the digest/digital signature for this element |
abstract java.io.InputStream |
getStream()
Deprecated. Returns a byte stream containing the element data. |
static java.lang.String |
getUniqueName()
Deprecated. Returns a pseudo-random unique string which can be used as an element name |
void |
sendToStream(java.io.OutputStream sendTo)
Deprecated. Sends the element data to the specified byte stream |
java.lang.Object |
setMessageProperty(java.lang.Object key,
java.lang.Object value)
Deprecated. associate a transient property with this message. |
java.lang.String |
toString()
Deprecated. Returns the string representation of this element. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected MimeMediaType type
protected NewMessageElement sig
protected java.util.HashMap properties
| Constructor Detail |
protected NewMessageElement(java.lang.String name,
MimeMediaType type,
NewMessageElement sig)
name - Name of the Element. May be the empty string ("") if
the Element is not named.type - Type of the Element. null is equivalent to specifying
the type "Application/Octet-stream"sig - optional message digest/digital signature elemnent. If
no signature is to be specified, pass null.| Method Detail |
public static java.lang.String getUniqueName()
public static java.lang.String getSequentialName()
getSequentialName() and a new pseudo-random value
will be chosen every time you restart the JavaVM.
Security Consideration : Be aware that the pseudo random portion of
the names generated by this string are shared amongst all peer groups
running in the same Java VM. You may be at a risk for loss of
annonimity if you use the element names produced in more than one peer
group.public final java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object target)
equals in class java.lang.Objecttarget - The to compare against.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public MimeMediaType getMimeType()
getMimeType in interface Documentpublic java.lang.String getFileExtension()
getFileExtension in interface Documentnet.jxta.document.Documentpublic abstract long getByteLength()
public abstract java.io.InputStream getStream()
throws java.io.IOException
getStream in interface Documentjava.io.IOException - if there is a problem getting the stream
public void sendToStream(java.io.OutputStream sendTo)
throws java.io.IOException
sendToStream in interface DocumentsendTo - the output stream to send the data to.java.io.IOException - if there is a problem sending the data to the specified streampublic NewMessageElement getSignature()
public java.lang.Object setMessageProperty(java.lang.Object key,
java.lang.Object value)
key - the property keyvalue - the value for the propertypublic java.lang.Object getMessageProperty(java.lang.Object key)
key - the property key.
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||