How to calculate byte size of file if I declared it indirectly(BufferedReader with pathname?) (Java 6) -
hypothetically have line
bufferedreader instream = new bufferedreader(new filereader("src.txt"));
at opening , closure of file how calculate size (for example length()
)
instream.legth()
? @ system.out.println()
?
use length
method of file
class:
file f = new file(filename); system.out.println(f.length())
please note can use f
in bufferreader
object :
bufferedreader br = new bufferedreader(new filereader(f));
Comments
Post a Comment