jsdsi.sexp
Class SexpInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--jsdsi.sexp.SexpInputStream

public class SexpInputStream
extends java.io.FilterInputStream

Reads serialized S-expressions from an underlying stream. Supports the canonical, transport, and readable S-expression encodings.

Author:
Sameer Ajmani
See Also:
SexpOutputStream

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
SexpInputStream(java.io.InputStream is)
          Creates a new SexpInputStream that reads from the given stream.
 
Method Summary
 Sexp readSexp()
          Reads the next S-expression from the stream.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SexpInputStream

public SexpInputStream(java.io.InputStream is)
Creates a new SexpInputStream that reads from the given stream.

Method Detail

readSexp

public Sexp readSexp()
              throws SexpException,
                     java.io.IOException
Reads the next S-expression from the stream.

Returns:
the decoded S-expression
Throws:
java.io.EOFException - if the stream is empty
SexpException - if there is a decoding error
java.io.IOException - if there is an IO error