Hi,
I was confused looking in the JavaDoc API and finding following method:
read(byte[] b) : Reads up to b.length bytes of data from this input stream into an array of bytes.
Now a byte in
Java is signed (max value 0x80), so how can the FileInputStream read correctly a binary file where there are bytes having a value bigger than 0x80 ?
If I try to compile : byte[] b = {0x98, 0xcb, 0xfe, 0x00}; I get the 'possible loss of precision: int, required: byte' error.
So isn't there also loss of precision using the read(byte[] b) method ?
Regards,
Stefan