public class StringComponent extends AbstractMessageComponent
Constructor and Description |
---|
StringComponent(java.lang.String name)
Construct a StringComponent with no content.
|
StringComponent(java.lang.String name,
java.lang.String value)
Construct a StringComponent with a specific value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue()
Get the value of this message component.
|
void |
read(java.io.InputStream in)
Read this component from a stream.
|
void |
setValue(java.lang.String value)
Set the value of this message component.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write this component to a stream.
|
getName
public StringComponent(java.lang.String name)
name
- The name of the component.public StringComponent(java.lang.String name, java.lang.String value)
name
- The name of the component.value
- The value of this component.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The value of the component.public void write(java.io.OutputStream out) throws java.io.IOException
MessageComponent
out
- The stream to write to.java.io.IOException
- If the write fails.public void read(java.io.InputStream in) throws java.io.IOException
MessageComponent
in
- The stream to read from.java.io.IOException
- If the read fails.public java.lang.String toString()
toString
in class java.lang.Object