|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.io.BufferedInputStream
|
+--sexp.SexpInputStream
This class provides S-Expression input stream functionallity, in the same manner as Ron Rivest's reference S-Expression parser.
SexpOutputStream| Field Summary | |
static String |
__me
|
private int |
bits
|
private int |
byteSize
|
private int |
count
|
boolean |
debug
|
private boolean |
isEOF
|
private int |
nBits
|
private int |
nextByte
|
private int[] |
saved_state
|
| Fields inherited from class java.io.BufferedInputStream |
buf,
count,
defaultBufferSize,
marklimit,
markpos,
pos |
| Fields inherited from class java.io.FilterInputStream |
in |
| Fields inherited from class java.io.InputStream |
SKIP_BUFFER_SIZE,
skipBuffer |
| Constructor Summary | |
SexpInputStream(InputStream stream)
Creates and initializes a new InputStream object. |
|
| Method Summary | |
void |
changeByteSize(int base)
Change the input byte size. |
boolean |
EOF()
Test to see if this stream have reached end-of-file. |
void |
mark(int readlimit)
Marks the current position and state in this input stream. |
int |
read()
Reads the next byte of data from this buffered input stream. |
void |
reset()
Repositions this stream to the position and state at the time the mark method was last called on this input stream. |
void |
scanBase64String(SimpleString ss,
long length)
Scan input as Base64 string of given length. |
long |
scanDecimal(long val)
Scan input as a decimal number of some encoding. |
void |
scanHexString(SimpleString ss,
long length)
Scan input as hexadecimal string of given length. |
SList |
scanList()
Scan input as a SList. |
SExpression |
scanObject()
Scans input for either a SList or a Sexp. |
void |
scanQuotedString(SimpleString ss,
long length)
Scan input as quoted string of given length. |
SimpleString |
scanSimpleString()
Scan input into a SimpleString. |
Sexp |
scanString()
Scan input as a Sexp. |
boolean |
scanToken(SimpleString ss)
Scan one or more characters into the given simple string as a token. |
void |
scanVerbatimString(SimpleString ss,
long length)
Scan input as verbatim string of given length. |
boolean |
skipChar(int c)
Skip the following input character on input stream is, if it is equal to the character c. |
boolean |
skipWhiteSpace()
Skip over any white space on the given InputStream. |
| Methods inherited from class java.io.BufferedInputStream |
|
| Methods inherited from class java.io.FilterInputStream |
read |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
| Field Detail |
public static final String __me
private int nextByte
private int byteSize
private int bits
private int nBits
private int count
private boolean isEOF
private int[] saved_state
public boolean debug
| Constructor Detail |
public SexpInputStream(InputStream stream)
stream - InputStream to attach this SexpInputStream to for input.| Method Detail |
public void mark(int readlimit)
BufferedInputStream.mark(int),
reset
public void reset()
throws IOException
BufferedInputStream.reset(),
markpublic void changeByteSize(int base)
newByteSize - 4 (hexadecimal), 6 (Base64), or 8 (binary raw data).public boolean EOF()
public int read()
throws IOException,
CharConversionException
BufferedInputStream
public boolean skipWhiteSpace()
throws IOException
public boolean skipChar(int c)
throws IOException
public boolean scanToken(SimpleString ss)
throws IOException
ss - SimpleString to scan token into
public long scanDecimal(long val)
throws IOException
val - starer value (typically 0)
public void scanVerbatimString(SimpleString ss,
long length)
throws IOException
ss - SimpleString to scan verbatim string intolength - length of verbatim string to scan
public void scanQuotedString(SimpleString ss,
long length)
throws IOException
ss - SimpleString to scan verbatim string intolength - length of verbatim string to scan. If of indefinite
length, use -1.
public void scanHexString(SimpleString ss,
long length)
throws IOException
ss - SimpleString to scan verbatim string intolength - length of verbatim string to scan. If of indefinite
length, use -1.
public void scanBase64String(SimpleString ss,
long length)
throws IOException
ss - SimpleString to scan verbatim string intolength - length of verbatim string to scan. If of indefinite
length, use -1.
public SimpleString scanSimpleString()
throws IOException
public Sexp scanString()
throws IOException
public SList scanList()
throws IOException
public SExpression scanObject()
throws IOException
SExpression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||