Parsing Engine

danbikel.parser
Class SexpObjectReaderFactory

java.lang.Object
  extended bydanbikel.parser.SexpObjectReaderFactory
All Implemented Interfaces:
ObjectReaderFactory

public class SexpObjectReaderFactory
extends Object
implements ObjectReaderFactory

The default factory used to construct ObjectReader objects by the Switchboard class. This class returns SexpObjectReader objects.


Constructor Summary
SexpObjectReaderFactory()
          Constructs a new object reader factory for reading Sexp objects from a text file.
 
Method Summary
 ObjectReader get(InputStream in)
          Returns a new SexpObjectReader constructed with the specified input stream argument.
 ObjectReader get(InputStream in, String encoding, int bufSize)
          Returns a new SexpObjectReader constructed with the specified arguments.
 ObjectReader get(String filename, String encoding, int bufSize)
          Returns a new SexpObjectReader constructed with the specified arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SexpObjectReaderFactory

public SexpObjectReaderFactory()
Constructs a new object reader factory for reading Sexp objects from a text file.

Method Detail

get

public ObjectReader get(InputStream in)
                 throws IOException
Returns a new SexpObjectReader constructed with the specified input stream argument.

Specified by:
get in interface ObjectReaderFactory
Parameters:
in - the input stream around which to construct a new SexpObjectReader
Returns:
a new SexpObjectReader constructed with the specified input stream argument
Throws:
IOException

get

public ObjectReader get(InputStream in,
                        String encoding,
                        int bufSize)
                 throws IOException
Returns a new SexpObjectReader constructed with the specified arguments.

Specified by:
get in interface ObjectReaderFactory
Parameters:
in - the input stream around which to construct the returned SexpObjectReader
encoding - the character encoding to use for reading S-expressions from the specified input stream
bufSize - the buffer size for the S-expression reader in the returned SexpObjectReader to use
Returns:
a new SexpObjectReader constructed with the specified arguments
Throws:
IOException - if there is a problem constructing a new SexpObjectReader using the specified arguments of this method

get

public ObjectReader get(String filename,
                        String encoding,
                        int bufSize)
                 throws IOException
Returns a new SexpObjectReader constructed with the specified arguments.

Specified by:
get in interface ObjectReaderFactory
Parameters:
filename - the name of the file around which to construct the returned SexpObjectReader
encoding - the character encoding to use for reading S-expressions from the specified input stream
bufSize - the buffer size for the S-expression reader in the returned SexpObjectReader to use
Returns:
a new SexpObjectReader constructed with the specified arguments
Throws:
IOException - if there is a problem constructing a new SexpObjectReader using the specified arguments of this method

Parsing Engine

Author: Dan Bikel.