fr.umlv.tatoo.runtime.buffer.impl
Class LinkedCharArrayCharacterBuffer

java.lang.Object
  extended by fr.umlv.tatoo.runtime.buffer.impl.LinkedCharArrayCharacterBuffer
All Implemented Interfaces:
CharacterBuffer

public class LinkedCharArrayCharacterBuffer
extends Object
implements CharacterBuffer

Author:
Julien

Constructor Summary
LinkedCharArrayCharacterBuffer(int arraysCapacity)
           
 
Method Summary
 CharSequence extractAndUnwind(int l)
           
 boolean hasRemaining()
           
 char next()
          Reads the next character from the buffer.
 boolean previousWasNewLine()
          Determines if the last unwinded character was an end of line.
 int read(int count, Reader in)
           
 void unwind(int l)
          Unwinds l characters from the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkedCharArrayCharacterBuffer

public LinkedCharArrayCharacterBuffer(int arraysCapacity)
Method Detail

extractAndUnwind

public 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

read

public int read(int count,
                Reader in)
         throws IOException
Throws:
IOException