org.jutil.io
Class LineScannerImpl

java.lang.Object
  extended by org.jutil.io.LineScannerImpl
All Implemented Interfaces:
LineScanner

public class LineScannerImpl
extends java.lang.Object
implements LineScanner


Field Summary
protected  java.lang.Object syncLock
          The object used to synchronize operations on this stream.
 
Constructor Summary
LineScannerImpl(java.io.File file)
           
 
Method Summary
 void append(java.lang.String str)
           
 void close()
           
static void main(java.lang.String[] args)
           
 java.lang.StringBuffer readLine()
           
 java.lang.StringBuffer readLine(int no)
           
 int[] scanFor(java.util.Comparator comparator)
           
 int[] scanFor(java.util.Comparator[] comparators, int startIndex, int endIndex)
           
 int[] scanFor(java.util.Comparator comparator, int startIndex)
           
 int[] scanFor(java.util.Comparator comparator, int startIndex, int endIndex)
           
 int[] scanFor(java.lang.String str)
           
 int[] scanFor(java.lang.String str, int startIndex)
           
 int[] scanFor(java.lang.String str, int startIndex, int endIndex)
           
 int[] scanForEquals(java.lang.String str)
           
 int[] scanForEquals(java.lang.String str, int startIndex)
           
 int[] scanForEquals(java.lang.String str, int startIndex, int endIndex)
           
 long seekEOF()
           
 long seekSOF()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

syncLock

protected java.lang.Object syncLock
The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.

Constructor Detail

LineScannerImpl

public LineScannerImpl(java.io.File file)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)

close

public void close()
           throws java.io.IOException
Specified by:
close in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.lang.String str)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.lang.String str,
                     int startIndex)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.lang.String str,
                     int startIndex,
                     int endIndex)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanForEquals

public int[] scanForEquals(java.lang.String str)
                    throws java.io.IOException
Specified by:
scanForEquals in interface LineScanner
Throws:
java.io.IOException

scanForEquals

public int[] scanForEquals(java.lang.String str,
                           int startIndex)
                    throws java.io.IOException
Specified by:
scanForEquals in interface LineScanner
Throws:
java.io.IOException

scanForEquals

public int[] scanForEquals(java.lang.String str,
                           int startIndex,
                           int endIndex)
                    throws java.io.IOException
Specified by:
scanForEquals in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.util.Comparator comparator)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.util.Comparator comparator,
                     int startIndex)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.util.Comparator comparator,
                     int startIndex,
                     int endIndex)
              throws java.io.IOException
Specified by:
scanFor in interface LineScanner
Throws:
java.io.IOException

scanFor

public int[] scanFor(java.util.Comparator[] comparators,
                     int startIndex,
                     int endIndex)
              throws java.io.IOException
Throws:
java.io.IOException

readLine

public java.lang.StringBuffer readLine()
                                throws java.io.IOException
Specified by:
readLine in interface LineScanner
Throws:
java.io.IOException

readLine

public java.lang.StringBuffer readLine(int no)
                                throws java.io.IOException
Specified by:
readLine in interface LineScanner
Throws:
java.io.IOException

append

public void append(java.lang.String str)
            throws java.io.IOException
Specified by:
append in interface LineScanner
Throws:
java.io.IOException

seekEOF

public final long seekEOF()
                   throws java.io.IOException
Specified by:
seekEOF in interface LineScanner
Throws:
java.io.IOException

seekSOF

public final long seekSOF()
                   throws java.io.IOException
Specified by:
seekSOF in interface LineScanner
Throws:
java.io.IOException