|
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
|
+--net.jxta.endpoint.NewByteArrayMessageElement
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 byte[] |
b
Deprecated. The bytes of this element. |
protected int |
len
Deprecated. length of the element data. |
protected int |
offset
Deprecated. This is the offset of our data within the array |
| Fields inherited from class net.jxta.endpoint.NewMessageElement |
name, properties, sig, type |
| Constructor Summary | |
NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
int offset,
int len,
NewMessageElement sig)
Deprecated. Create a new Element, but dont add it to the message. |
|
NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
int offset,
NewMessageElement sig)
Deprecated. Create a new Element, but dont add it to the message. |
|
NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
NewMessageElement sig)
Deprecated. Create a new Message Element. |
|
| Method Summary | |
boolean |
equals(java.lang.Object target)
Deprecated. Compare this MessageElement against another |
long |
getByteLength()
Deprecated. Returns the size of the element data. |
byte[] |
getBytes()
Deprecated. Returns the contents of this element as a byte array. |
java.io.InputStream |
getStream()
Deprecated. Returns a stream containing the element data. |
int |
hashCode()
Deprecated. Returns a hash code value for the object. |
void |
sendToStream(java.io.OutputStream sendTo)
Deprecated. Sends the element data to the specified stream |
java.lang.String |
toString()
Deprecated. Returns the string representation of this element. |
| Methods inherited from class net.jxta.endpoint.NewMessageElement |
clone, getFileExtension, getMessageProperty, getMimeType, getName, getSequentialName, getSignature, getUniqueName, setMessageProperty |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected byte[] b
protected int offset
protected int len
| Constructor Detail |
public NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
NewMessageElement sig)
namespace - namespace for the MessageElement.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"b - A byte array containing the contents of this element.sig - optional message digest/digital signature elemnent. If
no signature is to be specified, pass null.NullPointerException - if name or b are null.
public NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
int offset,
NewMessageElement sig)
namespace - namespace for the MessageElement.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"b - A byte array containing the contents of this element.offset - all bytes before this location in b
will be ignored.sig - optional message digest/digital signature elemnent. If
no signature is to be specified, pass null.NullPointerException - if name or b are null.IndexOutOfBoundsException - if offset is negative or greater
than or equal to the length of b
public NewByteArrayMessageElement(java.lang.String name,
MimeMediaType type,
byte[] b,
int offset,
int len,
NewMessageElement sig)
namespace - namespace for the MessageElement.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"b - A byte array containing the contents of this Element.offset - all bytes before this location will be ignored.len - number of bytes to includesig - optional message digest/digital signature elemnent. If
no signature is to be specified, pass null.NullPointerException - if name or b are null.IndexOutOfBoundsException - if offset is negative or greater
than or equal to the length of b or if
offset + len is greater than the length of b| Method Detail |
public boolean equals(java.lang.Object target)
equals in class NewMessageElementtarget - The to compare against.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class NewMessageElementpublic long getByteLength()
getByteLength in class NewMessageElementpublic java.io.InputStream getStream()
getStream in class NewMessageElement
public void sendToStream(java.io.OutputStream sendTo)
throws java.io.IOException
sendToStream in class NewMessageElementsendTo - the output stream to send the data to.public byte[] getBytes()
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||