|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--java.io.BufferedReader | +--com.javaranch.common.TextFileIn
Since TextFileIn extends BufferedReader and adds nothing more than a convenient constructor, all other member functions are identical to BufferedReader.
Example usage of TextFileIn:
TextFileIn in = new TextFileIn("file.txt"); boolean done = false ; while ( ! done ) { String s = in.readLine(); if ( s == null ) { done = true ; } else { System.out.println( s ); } } in.close();
- - - - - - - - - - - - - - - - -
Copyright (c) 1998-2004 Paul Wheaton
You are welcome to do whatever you want to with this source file provided that you maintain this comment fragment (between the dashed lines). Modify it, change the package name, change the class name ... personal or business use ... sell it, share it ... add a copyright for the portions you add ...
My goal in giving this away and maintaining the copyright is to hopefully direct developers back to JavaRanch.
The original source can be found at JavaRanch
- - - - - - - - - - - - - - - - -
Field Summary |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
TextFileIn(java.lang.String fileName)
|
Methods inherited from class java.io.BufferedReader |
close, mark, markSupported, read, read, readLine, ready, reset, skip |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextFileIn(java.lang.String fileName) throws java.io.FileNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |