fr.umlv.tatoo.runtime.buffer.impl
Class AbstractByteBufferCharacterBuffer
java.lang.Object
fr.umlv.tatoo.runtime.buffer.impl.AbstractByteBufferCharacterBuffer
- All Implemented Interfaces:
- CharacterBuffer
- Direct Known Subclasses:
- ByteBufferCharacterBuffer, CachedByteBufferCharacterBuffer
public abstract class AbstractByteBufferCharacterBuffer
- extends Object
- implements CharacterBuffer
ByteBufferCharacterBuffer.java
Created: Mon Jul 14 14:16:09 2003
- Version:
- $Revision$
- Author:
- Gilles Roussel
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
protected final ByteBuffer buffer
previousWasNL
protected boolean previousWasNL
channel
protected ByteChannel channel
position
protected int position
AbstractByteBufferCharacterBuffer
public AbstractByteBufferCharacterBuffer(int size,
ByteChannel channel)
AbstractByteBufferCharacterBuffer
public AbstractByteBufferCharacterBuffer(int size)
setChannel
public void setChannel(ByteChannel channel)
extractAndUnwind
public abstract CharSequence extractAndUnwind(int l)
unwind
public void unwind(int l)
- Description copied from interface:
CharacterBuffer
- Unwinds
l characters from the buffer.
- Specified by:
unwind in interface CharacterBuffer
- Parameters:
l - the number of characters to unwind
previousWasNewLine
public boolean previousWasNewLine()
- Description copied from interface:
CharacterBuffer
- Determines if the last unwinded character was an end of line.
- Specified by:
previousWasNewLine in interface CharacterBuffer
- Returns:
true if the last unwinded character was an end of line;
false otherwise
hasRemaining
public boolean hasRemaining()
next
public char next()
- Description copied from interface:
CharacterBuffer
- Reads the next character from the buffer. Current position in
the buffer is incremented.
- Specified by:
next in interface CharacterBuffer
- Returns:
- the next character in the buffer
compact
public void compact()
clear
public void clear()
position
public int position()
read
public int read()
throws IOException
- Throws:
IOException