|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.endpoint.MessageElement
net.jxta.impl.endpoint.JxtaMessageMessageElement
public class JxtaMessageMessageElement
A Message Element using a JXTA Message as the element data
Message,
MessageElement| Field Summary | |
|---|---|
protected Message |
msg
The Message which is the data for this message element. |
protected WireFormatMessage |
serial
A serialized form of the message. |
| Fields inherited from class net.jxta.endpoint.MessageElement |
|---|
cachedGetByteLength, cachedGetBytes, cachedToString, name, properties, sig, type |
| Constructor Summary | |
|---|---|
JxtaMessageMessageElement(String name,
MimeMediaType type,
Message msg,
MessageElement sig)
Create a new Message Element. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object target)
|
long |
getByteLength()
|
byte[] |
getBytes(boolean copy)
|
Message |
getMessage()
Returns the message which backs this element. |
InputStream |
getStream()
|
int |
hashCode()
|
void |
sendToStream(OutputStream sendTo)
|
String |
toString()
|
| Methods inherited from class net.jxta.endpoint.MessageElement |
|---|
clone, copyInputStreamToOutputStream, getElementName, getElementProperty, getFileExtension, getMimeType, getSequentialName, getSignature, getUniqueName, setElementProperty |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Message msg
protected transient WireFormatMessage serial
| Constructor Detail |
|---|
public JxtaMessageMessageElement(String name,
MimeMediaType type,
Message msg,
MessageElement sig)
name - Name of the MessageElement. May be the empty string ("") if
the MessageElement is not named.type - Type of the MessageElement. null is the same as specifying
the type "Application/Octet-stream".msg - A message which will be used as the element content for this
message.sig - optional message digest/digital signature elemnent or null if
no signature is desired.| Method Detail |
|---|
public boolean equals(Object target)
equals in class MessageElementpublic int hashCode()
hashCode in class MessageElementpublic String toString()
toString in class MessageElementpublic long getByteLength()
getByteLength in class MessageElementpublic byte[] getBytes(boolean copy)
getBytes in class MessageElement
public InputStream getStream()
throws IOException
IOException
public void sendToStream(OutputStream sendTo)
throws IOException
sendToStream in interface DocumentsendToStream in class MessageElementIOExceptionpublic Message getMessage()
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||