File.length() in Java returns incorrect length -


i have binary file. while run ls -l, has 12 bytes. however, when try find file's length file.length, result 9. hex representation of file (got xxd -p):

2090887fffd0ffff437ffd0c  

here code

currentbytesread = inputstream.read(buffer, bufferoffset, math.min(1024, filelength - bytesread)); 

here input file

https://www.dropbox.com/s/y508vsy8m2e8s9n/input.txt?dl=0

i using ubuntu 14.04 64 bits

from javadoc:

returns:

the length, in bytes, of file denoted abstract pathname, or 0l if file not exist. operating systems may return 0l pathnames denoting system-dependent entities such devices or pipes.`

are sure file path correct?


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -