scone.util.tokenstream
Class TokenBuffer
java.lang.Object
scone.util.tokenstream.TokenBuffer
public class TokenBuffer
- extends java.lang.Object
A Buffer to store Tokens.
Just do not mess with this class
- Version:
- 1.0
- Author:
- Volkert Buchmann (ported from code by Steve Ihde),
IBM Almaden Research Center,
(c) Copyright IBM Corp 2000
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenBuffer
public TokenBuffer(int capacity)
TokenBuffer
public TokenBuffer(Token[] source)
finalize
public void finalize()
- Overrides:
finalize
in class java.lang.Object
subscribe
public java.lang.Object subscribe()
subscribe
public java.lang.Object subscribe(java.lang.Object other)
unsubscribe
public void unsubscribe(java.lang.Object subscription)
mark
public void mark(java.lang.Object subscription,
int readlimit)
reset
public void reset(java.lang.Object subscription)
throws java.io.IOException
- Throws:
java.io.IOException
preserveMark
public void preserveMark(java.lang.Object subscription)
throws java.io.IOException
- Throws:
java.io.IOException
markSupported
public boolean markSupported()
getMark
public long getMark(java.lang.Object subscription)
throws java.io.IOException
- Throws:
java.io.IOException
unmark
public void unmark(java.lang.Object subscription)
read
public int read(Token[] buf,
int offset,
int size,
java.lang.Object context,
long timeout,
boolean peek)
throws AbortIOException,
java.io.InterruptedIOException,
MarkPreservedException
- Throws:
AbortIOException
java.io.InterruptedIOException
MarkPreservedException
write
public int write(Token[] buf,
int offset,
int size)
throws scone.util.tokenstream.TokenBufferClosedException,
AbortIOException
- Throws:
scone.util.tokenstream.TokenBufferClosedException
AbortIOException
done
public void done()
isDone
public boolean isDone()
doneReading
public void doneReading()
isDoneReading
public boolean isDoneReading()
available
public int available(java.lang.Object context)
handleAbort
public void handleAbort(AbortEvent ae)
isAborted
public boolean isAborted()
getAbortEvent
public AbortEvent getAbortEvent()
getOffset
public long getOffset(java.lang.Object context)