Valhalla Legends Forums Archive | Java Programming | Filesize

AuthorMessageTime
iago
Although I'm going to google search this, is there some way to find the size (in bytes) of a file without reading it in? There's no method in class File to do it, so I'm not not sure where else to look.

Thanks!

(If I find the answer, I'll post it here of course)
February 2, 2004, 7:41 PM
iago
RandomAccessFile.length()
February 2, 2004, 8:58 PM
Tuberload
File():
long length() : Returns the length of the file denoted by this abstract pathname.
February 2, 2004, 9:43 PM
iago
[quote author=Tuberload link=board=34;threadid=5049;start=0#msg42327 date=1075758180]
File():
long length() : Returns the length of the file denoted by this abstract pathname.
[/quote]

ugh, I don't know how I missed that!

I was looking for getLength() and getSize(), and I must have read that list 10 times (I could have sworn that I had seen it last week, but that I couldn't find it!)
February 3, 2004, 1:03 AM
Tuberload
I've done it a few times too. ;)
February 3, 2004, 1:08 AM

Search