public class StreamUtilities
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
StreamUtilities()
Prevents this class from being instantiated from outside.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
readString(java.io.DataInputStream in)
Reads a string from the given input stream and converts it
to null if required.
|
static void |
writeString(java.io.DataOutputStream out,
java.lang.String text)
Writes a string to the given output stream and emits an additional short
to transfer if
text is null. |
private StreamUtilities()
public static void writeString(java.io.DataOutputStream out,
java.lang.String text)
throws java.io.IOException
text is null.out - the output streamtext - the text to be emittedjava.io.IOException - in case of any I/O error or problempublic static java.lang.String readString(java.io.DataInputStream in)
throws java.io.IOException
in - the input streaminjava.io.IOException - in case of any I/O error or problem