upidiff.input
Class InputBuffer

java.lang.Object
  |
  +--upidiff.input.InputBuffer

public class InputBuffer
extends Object

Class to save the File from the inputsource

Author:
kasbar

Field Summary
private  String[] fileLines
          An array of strings that saves the file as lines
private  InputSource inputSource
          Variable for resource from input.
private  int lineLength
          The length of the longest line
private  int[] lineOffset
          An array for saving the offsets from the Lines.
private  List listFilter
          List for saving the active Filter.
 
Constructor Summary
InputBuffer(InputSource inputSource)
          constructor that has the source from the file as argument.
 
Method Summary
 void addFilter(InputBufferFilter currentFilter)
          add one filter in the list
private  void filterThis(Vector lines)
          Runs the input filters.
 InputSource getInputSource()
          Querries the InputSource
 int getLineLength()
          Methode to get length of the longest line
 int[] getlineOffset()
          this method gives the offsets from the lines.
 String[] getLines()
          getMethode from the file .
 void readInputLines()
          Reads the input lines from the input source.
 void removeFilter(InputBufferFilter currentFilter)
          remove one filter from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileLines

private String[] fileLines
An array of strings that saves the file as lines


lineOffset

private int[] lineOffset
An array for saving the offsets from the Lines.


lineLength

private int lineLength
The length of the longest line


listFilter

private List listFilter
List for saving the active Filter.


inputSource

private InputSource inputSource
Variable for resource from input.

Constructor Detail

InputBuffer

public InputBuffer(InputSource inputSource)
constructor that has the source from the file as argument.

Parameters:
inputSource - The source from the file
Method Detail

readInputLines

public void readInputLines()
                    throws InputException
Reads the input lines from the input source.

Throws:
InputException - This exception is thrown whenever the InputBuffer fails to read data from the input data stream.

filterThis

private void filterThis(Vector lines)
Runs the input filters.

Parameters:
lines - Input lines.

addFilter

public void addFilter(InputBufferFilter currentFilter)
add one filter in the list

Parameters:
currentFilter - name for new filter.

removeFilter

public void removeFilter(InputBufferFilter currentFilter)
remove one filter from the list.

Parameters:
currentFilter - filter must be removed .

getlineOffset

public int[] getlineOffset()
this method gives the offsets from the lines.

Returns:
an array from typ integer

getLines

public String[] getLines()
getMethode from the file .

Returns:
an array from typ string.

getLineLength

public int getLineLength()
Methode to get length of the longest line

Returns:
the length

getInputSource

public InputSource getInputSource()
Querries the InputSource

Returns:
the InputSource