|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.morph.ReadFile
Title: ReadFile.java
Description: This class provides methods to read the file (provided by the user) and to have the read access to each and every line separately
Field Summary | |
private BufferedReader |
br
Instance of BufferedReader used to read the files with UTF-8 encoding |
private ArrayList |
data
Stores each line of the file as a separate String in the ArrayList |
private int |
pointer
Pointer which keeps track of what line is accessible to the user |
Constructor Summary | |
ReadFile(URL fileURL)
Constructor - Initialise the buffered Reader instance |
Method Summary | |
String |
getNext()
This method gives the next available String (line from the file) |
int |
getPointer()
Tells the position of the pointer in the file |
boolean |
hasNext()
This method tells if next line is available to read |
boolean |
read()
Reads the file and stores each line as a separate element in the ArrayList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private BufferedReader br
private int pointer
private ArrayList data
Constructor Detail |
public ReadFile(URL fileURL)
Method Detail |
public boolean read()
public boolean hasNext()
public String getNext()
public int getPointer()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |