N
news.t-com.hr
File file = new File("c:\\test.txt");
InputStream inputFileStream = null;
//0inputFileStream = new BufferedInputStream(new FileInputStream(file));
BufferedReader r = null;
Reader fReader = null;
System.out.println(inputFileStream);
fReader = new InputStreamReader(inputFileStream,"ISO-8859-1");
r = new BufferedReader(fReader);
while (r.ready()) {
String line = r.readLine();
}
//1
inputFileStream = new BufferedInputStream(new FileInputStream(file));
//2
My question is why is it if I call inputFileStream.available() on comment 1
, I get zero , and when i call it on line two it is not zero ? , and
on comment 2 , do I have two stream's open, or just one, because before
calling inputFileStream = new BufferedInputStream(new
FileInputStream(file));
i didn't closed inputFileStream opened on comment 0?
Thanks in advance.
InputStream inputFileStream = null;
//0inputFileStream = new BufferedInputStream(new FileInputStream(file));
BufferedReader r = null;
Reader fReader = null;
System.out.println(inputFileStream);
fReader = new InputStreamReader(inputFileStream,"ISO-8859-1");
r = new BufferedReader(fReader);
while (r.ready()) {
String line = r.readLine();
}
//1
inputFileStream = new BufferedInputStream(new FileInputStream(file));
//2
My question is why is it if I call inputFileStream.available() on comment 1
, I get zero , and when i call it on line two it is not zero ? , and
on comment 2 , do I have two stream's open, or just one, because before
calling inputFileStream = new BufferedInputStream(new
FileInputStream(file));
i didn't closed inputFileStream opened on comment 0?
Thanks in advance.