|
@@ -40,19 +40,19 @@ public class TextFile {
|
40
|
40
|
/**
|
41
|
41
|
* The file we're dealing with.
|
42
|
42
|
*/
|
43
|
|
- private Path path;
|
|
43
|
+ private final Path path;
|
44
|
44
|
/**
|
45
|
45
|
* The input stream we're dealing with.
|
46
|
46
|
*/
|
47
|
|
- private InputStream is;
|
48
|
|
- /**
|
49
|
|
- * The lines we've read from the file.
|
50
|
|
- */
|
51
|
|
- private List<String> lines;
|
|
47
|
+ private final InputStream is;
|
52
|
48
|
/**
|
53
|
49
|
* The charset to use to read the file.
|
54
|
50
|
*/
|
55
|
51
|
private final Charset charset;
|
|
52
|
+ /**
|
|
53
|
+ * The lines we've read from the file.
|
|
54
|
+ */
|
|
55
|
+ private List<String> lines;
|
56
|
56
|
|
57
|
57
|
/**
|
58
|
58
|
* Creates a new instance of TextFile for the specified file, and uses the
|
|
@@ -115,6 +115,7 @@ public class TextFile {
|
115
|
115
|
*/
|
116
|
116
|
public TextFile(final Path path, final Charset charset) {
|
117
|
117
|
this.path = path;
|
|
118
|
+ this.is = null;
|
118
|
119
|
this.charset = charset;
|
119
|
120
|
}
|
120
|
121
|
|
|
@@ -127,6 +128,7 @@ public class TextFile {
|
127
|
128
|
* @since 0.6.3m1
|
128
|
129
|
*/
|
129
|
130
|
public TextFile(final InputStream is, final Charset charset) {
|
|
131
|
+ this.path = null;
|
130
|
132
|
this.is = is;
|
131
|
133
|
this.charset = charset;
|
132
|
134
|
}
|