xbn.util
Class FLRFile

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.util.ForLineRetrieval
              |
              +--xbn.util.FLRFile

public class FLRFile
extends ForLineRetrieval

A ForLineRetrieval where the source text comes from a text File.

Source code:  FLRFile.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
FLRFile(String s_fileName)
          Create a FLRFile.
 
Method Summary
protected  void finalize()
          When this OWFile object is destroyed, this properly closes the FileInputStream.
 String getFileName()
          Get the file name.
 StringBuffer getNextLine()
          Get the next line from the file, including the ending new line ("\n").
 boolean hasMoreLines()
          Are there any more lines to retrieved?
 String toString()
          Get some information about this FLRFile.
 
Methods inherited from class xbn.util.ForLineRetrieval
getLineNumberNext, getLineNumberPrev, getLineSeparator, getLineSepLength, incLineNumber
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FLRFile

public FLRFile(String s_fileName)

Create a FLRFile.

Parameters:
s_fileName - The relative or full path and file name, representing a file that contains source text. This file must exist and be readable.
Method Detail

getNextLine

public StringBuffer getNextLine()

Get the next line from the file, including the ending new line ("\n"). If all lines have been retrieved (if hasMoreLines equals false), then return null.

Overrides:
getNextLine in class ForLineRetrieval

hasMoreLines

public boolean hasMoreLines()

Are there any more lines to retrieved?

Overrides:
hasMoreLines in class ForLineRetrieval
Returns:
true If there is at least one more line to be retrieved by getNextLine.
false If there are no more lines left to retrieve.

getFileName

public String getFileName()

Get the file name. This file name is exactly as provided to this class' constructor.


toString

public final String toString()

Get some information about this FLRFile.

Overrides:
toString in class Object

finalize

protected void finalize()
                 throws Throwable

When this OWFile object is destroyed, this properly closes the FileInputStream.

Overrides:
finalize in class Object



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo