net.spy.util
Class NetStringEncoder
java.lang.Object
net.spy.util.NetStringEncoder
- public class NetStringEncoder
- extends Object
Encode netstrings.
See netstring spec.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetStringEncoder
public NetStringEncoder(String encoding)
- Get an instance of NetStringEncoder.
encodeString
public final void encodeString(String s,
OutputStream os)
throws IOException
- Encode a String as a netstring to the given output stream.
- Parameters:
s - the stringos - the stream
- Throws:
IOException - if there's a problem writing to the string