net.spy.util
Class NetStringDecoder

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.util.NetStringDecoder

public class NetStringDecoder
extends SpyObject

Decode netstrings. See netstring spec.


Constructor Summary
NetStringDecoder(java.lang.String enc)
          Get an instance of NetStringDecoder.
 
Method Summary
 java.lang.String decodeString(java.io.InputStream is)
          Pull a netstring from the given InputStream and decode it.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetStringDecoder

public NetStringDecoder(java.lang.String enc)
Get an instance of NetStringDecoder.

Method Detail

decodeString

public java.lang.String decodeString(java.io.InputStream is)
                              throws java.io.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:
java.io.IOException - if there is a problem decoding the netstring


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.