mk.fsgrep.util
Class RawLineReader
java.lang.Object
mk.fsgrep.util.RawLineReader
public class RawLineReader
- extends java.lang.Object
A utility that fully reads a file and provides access to the contents
as a List of lines.
It is meant to replace LineNumberReader and (its parent) BufferedReader
because those consume the EOL characters when returning lines.
- Author:
- Murali Krishnan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RawLineReader
public RawLineReader(java.lang.String pFileName)
RawLineReader
public RawLineReader(java.io.File pFile)
RawLineReader
protected RawLineReader()
- For testing only.
getFile
protected java.io.File getFile()
getSize
public int getSize()
getLines
protected java.util.LinkedList<FileLine> getLines()
setSize
public void setSize(int val)
initialize
protected void initialize()
initialize
protected void initialize(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
initialize
protected void initialize(java.lang.String content)
getFileName
protected java.lang.String getFileName()
saveTo
protected void saveTo(java.lang.String pString)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hasMore
public boolean hasMore()
nextLine
public FileLine nextLine()
main
public static void main(java.lang.String[] args)
Copyright © 2009. All Rights Reserved.