flattree.flat.read
Class FixedLengthReadLine

java.lang.Object
  extended by flattree.flat.read.FixedLengthReadLine
All Implemented Interfaces:
Line, Position, ReadLine

public class FixedLengthReadLine
extends Object
implements ReadLine

A line bounded by a fixed length.


Field Summary
 
Fields inherited from interface flattree.flat.ReadLine
END
 
Constructor Summary
FixedLengthReadLine(ReadLine line, int length)
          Bound the given line.
 
Method Summary
 void drain()
          Drain this line, i.e.
 int getColumnIndex()
          Get the current column index.
 int getIndex()
          Get the index of the current character.
 int getRowIndex()
          Get the current row index.
 char read()
          Read the next character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthReadLine

public FixedLengthReadLine(ReadLine line,
                           int length)
Bound the given line.

Parameters:
line - line to bound
length - fixed length to bound line to
Method Detail

getIndex

public int getIndex()
Description copied from interface: Position
Get the index of the current character.

Specified by:
getIndex in interface Position
Returns:
index

getRowIndex

public int getRowIndex()
Description copied from interface: Position
Get the current row index.

Specified by:
getRowIndex in interface Position
Returns:
row index

getColumnIndex

public int getColumnIndex()
Description copied from interface: Position
Get the current column index.

Specified by:
getColumnIndex in interface Position
Returns:
column index

read

public char read()
Description copied from interface: ReadLine
Read the next character.

Specified by:
read in interface ReadLine
Returns:
the next character or ReadLine.END

drain

public void drain()
Description copied from interface: ReadLine
Drain this line, i.e. discard all remaining characters.

Specified by:
drain in interface ReadLine


Copyright © 2011. All Rights Reserved.