Description
From Albert Chern:
I think there may be a bug in the read() method of NativeS3InputStream, which looks like this:
public synchronized int read() throws IOException { int result = in.read(); if (result > 0) { pos += result; } return result; }
The return value of InputStream.read() should be the next byte in the range 0 to 255, or -1 if there are no more bytes. So shouldn't this method look something like this?
public synchronized int read() throws IOException { int result = in.read(); if (result > -1) { pos ++; } return result; }