Commit ab402bd1 by ojw28

Merge pull request #429 from gitanuj/datasourceinputstream-fix

Fix DataSourceInputStream.read() for EOF cases
parents 7f58a0be 2a06c264
......@@ -58,8 +58,11 @@ public class DataSourceInputStream extends InputStream {
@Override
public int read() throws IOException {
read(singleByteArray);
return singleByteArray[0] & 0xFF;
int length = read(singleByteArray);
if(length != -1) {
return singleByteArray[0] & 0xFF;
}
return length;
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment