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

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -