|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.SexpNumberedObjectReader
public class SexpNumberedObjectReader
Reads an underlying stream with a SexpTokenizer
,
converting S-expressions of the form
(num processed obj), where obj
is a Sexp
and processed is a Symbol
whose print-name is the output of String.valueOf(boolean)
, to
NumberedObject objects.
SexpNumberedObjectReaderFactory
Constructor Summary | |
---|---|
SexpNumberedObjectReader(InputStream in)
Constructs a new instance, reading numbered S-expressions from the specified input stream using the default character encoding. |
|
SexpNumberedObjectReader(InputStream in,
String encoding,
int bufSize)
Constructs a new numbered object reader from the specified filename, file encoding and buffer size, by building a SexpTokenizer
from the specified arguments. |
|
SexpNumberedObjectReader(String filename,
String encoding,
int bufSize)
Constructs a new numbered object reader from the specified filename, file encoding and buffer size, by building a SexpTokenizer
from the specified arguments. |
Method Summary | |
---|---|
void |
close()
Closes the underlying S-expression reader. |
Object |
readObject()
Returns a NumberedObject instance constructed from the next
numbered S-expression in the stream or file that this reader wraps. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SexpNumberedObjectReader(InputStream in)
in
- the input stream from which to read numbered S-expressionspublic SexpNumberedObjectReader(InputStream in, String encoding, int bufSize) throws IOException
SexpTokenizer
from the specified arguments.
in
- the input stream from which to read numbered S-expressionsencoding
- the character encoding to use when reading from the
specified filebufSize
- the buffer size to use when reading from the specified
file
IOException
SexpTokenizer.SexpTokenizer(InputStream,String,int)
public SexpNumberedObjectReader(String filename, String encoding, int bufSize) throws IOException
SexpTokenizer
from the specified arguments.
filename
- the filename from which to read numbered S-expressionsencoding
- the character encoding to use when reading from the
specified filebufSize
- the buffer size to use when reading from the specified
file
IOException
SexpTokenizer.SexpTokenizer(String,String,int)
Method Detail |
---|
public Object readObject() throws IOException
NumberedObject
instance constructed from the next
numbered S-expression in the stream or file that this reader wraps.
A numbered S-expression is a list of the form
(num processed obj), where obj
is a Sexp
and processed is a Symbol
whose print-name is the output of String.valueOf(boolean)
, to
NumberedObject objects.
readObject
in interface ObjectReader
NumberedObject
instance constructed from the next
numbered S-expression in the stream or file that this reader wraps.
IOException
- if there is a problem reading from the underlying
stream, or if the S-expression read is not in the proper formatpublic void close() throws IOException
close
in interface ObjectReader
IOException
- if there is a problem closing the underlying stream
used by the underlying S-expression reader
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |