Parsing Engine

danbikel.parser
Class SexpNumberedObjectReaderFactory

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

public class SexpNumberedObjectReaderFactory
extends Object
implements ObjectReaderFactory

The default NumberedSentenceReaderFactory used by Switchboard. This class provides new instances of SexpNumberedSentenceReader objects.

See Also:
SexpNumberedObjectReader

Constructor Summary
SexpNumberedObjectReaderFactory()
          Constructs a new factory.
 
Method Summary
 ObjectReader get(InputStream in)
          Returns a new SexpNumberedObjectReader constructed with the specified input stream argument.
 ObjectReader get(InputStream in, String encoding, int bufSize)
          Returns a new SexpNumberedObjectReader constructed with the specified arguments.
 ObjectReader get(String filename, String encoding, int bufSize)
          Returns a new SexpNumberedObjectReader 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

SexpNumberedObjectReaderFactory

public SexpNumberedObjectReaderFactory()
Constructs a new factory.

Method Detail

get

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

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

get

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

Specified by:
get in interface ObjectReaderFactory
Parameters:
in - the input stream around which to construct the returned SexpNumberedObjectReader
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 SexpNumberedObjectReader to use
Returns:
a new SexpNumberedObjectReader constructed with the specified arguments
Throws:
IOException - if there is a problem constructing a new SexpNumberedObjectReader using the specified arguments of this method

get

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

Specified by:
get in interface ObjectReaderFactory
Parameters:
filename - the name of the file around which to construct the returned SexpNumberedObjectReader
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 SexpNumberedObjectReader to use
Returns:
a new SexpNumberedObjectReader constructed with the specified arguments
Throws:
IOException - if there is a problem constructing a new SexpNumberedObjectReader using the specified arguments of this method

Parsing Engine

Author: Dan Bikel.