org.sourcejammer.util
Class BufferedLineReader
java.lang.Object
  |
  +--org.sourcejammer.util.BufferedLineReader
- public class BufferedLineReader- extends java.lang.Object
Title: $FileName: BufferedLineReader.java$
- Version:
- $VerNum: 5$
- Author:
- $AuthorName: Rob MacGrogan$
 
 $Description: Reads char files one line at a time without EOF EOL bug.$
 $KeyWordsOff: $
 
 This class iterates through the characters in a Reader object one line at
 at time. It might seem like this is the same as the function of
 java.io.BufferedReader, and in fact it is. But BufferedReader has a bug that
 causes it to drop the last line in a text file if that file contains only
 an EOL marker and nothing else. This class avoids this bug.
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
reader
private java.io.Reader reader
lastEOL
private char lastEOL
endOfStream
private boolean endOfStream
firstLine
private boolean firstLine
lastLineWasInitialBlankLine
private boolean lastLineWasInitialBlankLine
WIN_EOL
private static final java.lang.String WIN_EOL
fileEOLSet
private boolean fileEOLSet
fileEOL
private java.lang.String fileEOL
BufferedLineReader
public BufferedLineReader(java.io.Reader reader)
isExhausted
public boolean isExhausted()
- 
 
initialBlankLineSpecialCase
private void initialBlankLineSpecialCase(char ch,
                                         java.lang.StringBuffer strLine)
- 
 
readLine
public java.lang.String readLine()
                          throws java.io.IOException
- 
- java.io.IOException
 
needsNewLineAtEOF
private boolean needsNewLineAtEOF(java.lang.String line)
- 
 
setFileEOL
private void setFileEOL(char ch)
- 
 
getUnderlyingReader
public java.io.Reader getUnderlyingReader()
- 
 
isEOL
private boolean isEOL(char ch)
- Returns true if the character is an EOL.
 
- 
 
main
public static void main(java.lang.String[] args)
- 
 
Copyright © 2003 Soucejammer project.