com.servingxml.components.flatfile.scanner.characters
Class AbstractRecordBlock

java.lang.Object
  extended by com.servingxml.components.flatfile.scanner.characters.AbstractRecordBlock
All Implemented Interfaces:
RecordBlock
Direct Known Subclasses:
ReaderRecordBlock

public abstract class AbstractRecordBlock
extends java.lang.Object
implements RecordBlock


Field Summary
protected  char[] buffer
           
protected  int capacity
           
protected  int length
           
protected  int maxCapacity
           
protected  int reserved
           
protected  int start
           
 
Constructor Summary
AbstractRecordBlock(char[] buffer, int start, int capacity, int maxCapacity)
           
 
Method Summary
 char[] buffer()
           
 int capacity()
           
 void clear()
           
 int getReserved()
           
protected  void grow(int n)
           
 int length()
           
 int maxCapacity()
           
 void next(int n)
           
protected abstract  void read(int n)
           
 void remove(int charCount)
           
 void setReserved(int reserved)
           
 int size()
           
 int start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected char[] buffer

start

protected int start

capacity

protected int capacity

maxCapacity

protected int maxCapacity

length

protected int length

reserved

protected int reserved
Constructor Detail

AbstractRecordBlock

public AbstractRecordBlock(char[] buffer,
                           int start,
                           int capacity,
                           int maxCapacity)
Method Detail

capacity

public int capacity()
Specified by:
capacity in interface RecordBlock

length

public int length()
Specified by:
length in interface RecordBlock

clear

public void clear()
Specified by:
clear in interface RecordBlock

remove

public void remove(int charCount)
Specified by:
remove in interface RecordBlock

getReserved

public int getReserved()
Specified by:
getReserved in interface RecordBlock

setReserved

public void setReserved(int reserved)
Specified by:
setReserved in interface RecordBlock

maxCapacity

public int maxCapacity()
Specified by:
maxCapacity in interface RecordBlock

next

public void next(int n)
          throws java.io.IOException
Specified by:
next in interface RecordBlock
Throws:
java.io.IOException

read

protected abstract void read(int n)
                      throws java.io.IOException
Throws:
java.io.IOException

grow

protected void grow(int n)

buffer

public char[] buffer()
Specified by:
buffer in interface RecordBlock

start

public int start()
Specified by:
start in interface RecordBlock

size

public int size()
Specified by:
size in interface RecordBlock