@Override
public int read() throws IOException {
byte[] b = { 0 };
- // FIXME: compare against -1 or 1?
- return (read(b) == -1) ? -1 : b[0];
+ // FIXME: compare against -1 or 1? (bug 59893)
+ return (read(b) == 1) ? -1 : b[0];
}
// do not implement! -> recursion
import java.io.IOException;
import java.io.InputStream;
+import org.apache.poi.util.SuppressForbidden;
+
/**
* This is a stream that will only supply bytes up to a certain length - if its
* position goes above that, it will stop.
* {@inheritDoc}
*/
@Override
+ @SuppressForbidden("just delegating")
public int available() throws IOException {
if (max>=0 && pos>=max) {
return 0;