public class TokenBuffer extends Queue implements TokenReader
| Constructor and Description |
|---|
TokenBuffer() |
TokenBuffer(int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
Token |
read()
reads a Token from this buffer.
|
void |
write(IOException e) |
void |
write(Token tok)
This method blocks if the buffer is full.
|
public TokenBuffer(int bufferSize)
bufferSize - the maximum size of this buffer.public TokenBuffer()
public Token read() throws IOException, InterruptedException
read in interface TokenReaderIOExceptionInterruptedExceptionTokenReaderpublic void write(Token tok) throws InterruptedException
tok - the token to write to this bufferInterruptedExceptionpublic void write(IOException e) throws InterruptedException
InterruptedExceptionCopyright © 2001-2012 Apache Software Foundation. All Rights Reserved.