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
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
Post a Comment