public class RawDataComponent extends AbstractMessageComponent
| Constructor and Description |
|---|
RawDataComponent(java.lang.String name)
Construct a RawDataComponent with no content.
|
RawDataComponent(java.lang.String name,
byte[] data)
Construct a RawDataComponent with some data.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Get the data in this message component.
|
void |
read(java.io.InputStream in)
Read this component from a stream.
|
void |
setData(byte[] newData)
Set the data for this message component.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write this component to a stream.
|
getNamepublic RawDataComponent(java.lang.String name)
name - The name of the component.public RawDataComponent(java.lang.String name,
byte[] data)
name - The name of the component.data - The data of this component.public byte[] getData()
public void setData(byte[] newData)
newData - The new data.public void write(java.io.OutputStream out)
throws java.io.IOException
MessageComponentout - The stream to write to.java.io.IOException - If the write fails.public void read(java.io.InputStream in)
throws java.io.IOException
MessageComponentin - The stream to read from.java.io.IOException - If the read fails.public java.lang.String toString()
toString in class java.lang.Object