|
@@ -46,12 +46,10 @@ public class ReverseFileReader {
|
46
|
46
|
* Create a new ReverseFileReader.
|
47
|
47
|
*
|
48
|
48
|
* @param filename File to open.
|
49
|
|
- * @throws FileNotFoundException If the file is not a regular file.
|
50
|
49
|
* @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
|
51
|
50
|
* @throws IOException If there is an error seeking to the end of the file.
|
52
|
51
|
*/
|
53
|
|
- public ReverseFileReader(final String filename) throws FileNotFoundException,
|
54
|
|
- SecurityException, IOException {
|
|
52
|
+ public ReverseFileReader(final String filename) throws SecurityException, IOException {
|
55
|
53
|
file = new RandomAccessFile(filename, "r");
|
56
|
54
|
reset();
|
57
|
55
|
}
|
|
@@ -60,12 +58,10 @@ public class ReverseFileReader {
|
60
|
58
|
* Create a new ReverseFileReader.
|
61
|
59
|
*
|
62
|
60
|
* @param myFile Existing file to use.
|
63
|
|
- * @throws FileNotFoundException If the file is not a regular file.
|
64
|
61
|
* @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
|
65
|
62
|
* @throws IOException If there is an error seeking to the end of the file.
|
66
|
63
|
*/
|
67
|
|
- public ReverseFileReader(final File myFile) throws FileNotFoundException,
|
68
|
|
- SecurityException, IOException {
|
|
64
|
+ public ReverseFileReader(final File myFile) throws SecurityException, IOException {
|
69
|
65
|
file = new RandomAccessFile(myFile, "r");
|
70
|
66
|
reset();
|
71
|
67
|
}
|
|
@@ -118,10 +114,9 @@ public class ReverseFileReader {
|
118
|
114
|
* Get the next full line.
|
119
|
115
|
*
|
120
|
116
|
* @return The next full line.
|
121
|
|
- * @throws EOFException If there is no more lines.
|
122
|
117
|
* @throws IOException If an error reading or seeking occured, or if the fiel is closed.
|
123
|
118
|
*/
|
124
|
|
- public String getNextLine() throws EOFException, IOException {
|
|
119
|
+ public String getNextLine() throws IOException {
|
125
|
120
|
if (file == null) {
|
126
|
121
|
throw new IOException("File has been closed.");
|
127
|
122
|
}
|