net.spy.util
Class NetStringDecoder
java.lang.Object
net.spy.SpyObject
net.spy.util.NetStringDecoder
- public class NetStringDecoder
- extends SpyObject
Decode netstrings.
See netstring spec.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NetStringDecoder
public NetStringDecoder(String encoding)
- Get an instance of NetStringDecoder.
decodeString
public String decodeString(InputStream is)
throws IOException
- Pull a netstring from the given InputStream and decode it.
- Parameters:
is - a stream containing a netstring
- Returns:
- the String representing the netstring at the beginning of
this stream
- Throws:
IOException - if there is a problem decoding the netstring