|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.util.tokenstream.TokenInputStream
scone.util.tokenstream.TokenInputStreamBufferImpl
public class TokenInputStreamBufferImpl
reads Tokens from the TokenBuffer a TokenOutputStream writes to.
Constructor Summary | |
---|---|
TokenInputStreamBufferImpl(TokenOutputStream out)
creates a new TokenInputBufferImpl that reads from a TokenBuffer. |
Method Summary | |
---|---|
void |
close()
Close the input stream. |
java.util.Hashtable |
getMetaInfo()
returns the meta info associated with this TokenInputStream |
boolean |
isClosed()
Determines if the input stream is closed. |
void |
mark(int readlimit)
Mark the stream for later resetting |
boolean |
markSupported()
Test whether mark() and reset() are supported. |
Token |
read()
Read a Token from the input stream. |
int |
read(Token[] buf)
Read Tokens from the input stream filling the specified Token array. |
int |
read(Token[] buf,
int offset,
int length)
Read multiple Tokens from the input stream. |
void |
reset()
Reset the stream to its previous mark |
Methods inherited from class scone.util.tokenstream.TokenInputStream |
---|
create, create |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TokenInputStreamBufferImpl(TokenOutputStream out)
out
- the TokenOutputStream that holds the TokenBufferMethod Detail |
---|
public Token read() throws java.io.IOException
read
in class TokenInputStream
java.io.IOException
- If stream closed.
MarkPreservedException
- If read would invalidate preserved
markpublic int read(Token[] buf, int offset, int length) throws java.io.IOException
read
in class TokenInputStream
buf
- The Token buffer to populate.offset
- The offset in buf
to starting writing to.length
- The amount of Tokens to write.
java.io.IOException
- If stream closed.
MarkPreservedException
- If read would invalidate preserved
markpublic int read(Token[] buf) throws java.io.IOException
read
in class TokenInputStream
buf
- The Token buffer to populate.
java.io.IOException
- If stream closed.
MarkPreservedException
- If read would invalidate preserved
markpublic void close() throws java.io.IOException
close
in class TokenInputStream
java.io.IOException
public boolean isClosed()
isClosed
in class TokenInputStream
true
if stream closed; else false
.public void mark(int readlimit)
mark
in class TokenInputStream
readlimit
- The number of Tokens read beyond which the mark
will become invalid.public void reset() throws java.io.IOException
reset
in class TokenInputStream
java.io.IOException
- if the stream was not marked or the mark
has become invalid.public boolean markSupported()
mark()
and reset()
are supported.
markSupported
in class TokenInputStream
true
if mark()
and
reset()
are supported, false
otherwise.public java.util.Hashtable getMetaInfo()
getMetaInfo
in class TokenInputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |