org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools
Class TokenBuffer
java.lang.Object
org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools.Queue
org.apache.myfaces.buildtools.maven2.plugin.javascript.uixtools.TokenBuffer
- All Implemented Interfaces:
- TokenReader
public class TokenBuffer
- extends Queue
- implements TokenReader
A buffer to hold Token objects. Tokens can be read from and written to this
buffer as if it were a queue. it is thread safe. Best if a single thread is
reading and a single thread is writing.
- Version:
- $Name: $ ($Revision: 606225 $) $Date: 2007-12-21 16:55:00 +0100 (Fri, 21 Dec 2007) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenBuffer
public TokenBuffer(int bufferSize)
- Parameters:
bufferSize
- the maximum size of this buffer.
TokenBuffer
public TokenBuffer()
read
public Token read()
throws IOException,
InterruptedException
- reads a Token from this buffer. This method blocks until data is available
- Specified by:
read
in interface TokenReader
- Returns:
- null if there is no more data and this buffer has been closed.
- Throws:
IOException
InterruptedException
- See Also:
TokenReader
write
public void write(Token tok)
throws InterruptedException
- This method blocks if the buffer is full.
- Parameters:
tok
- the token to write to this buffer
- Throws:
InterruptedException
write
public void write(IOException e)
throws InterruptedException
- Throws:
InterruptedException
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.