bug 59893: fix a few forgotten unrelated changes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783356 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1584310ac5
commit
ee6677ee56
@ -77,8 +77,8 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream {
|
|||||||
@Override
|
@Override
|
||||||
public int read() throws IOException {
|
public int read() throws IOException {
|
||||||
byte[] b = { 0 };
|
byte[] b = { 0 };
|
||||||
// FIXME: compare against -1 or 1?
|
// FIXME: compare against -1 or 1? (bug 59893)
|
||||||
return (read(b) == -1) ? -1 : b[0];
|
return (read(b) == 1) ? -1 : b[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not implement! -> recursion
|
// do not implement! -> recursion
|
||||||
|
@ -19,6 +19,8 @@ package org.apache.poi.util;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
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
|
* This is a stream that will only supply bytes up to a certain length - if its
|
||||||
* position goes above that, it will stop.
|
* position goes above that, it will stop.
|
||||||
@ -146,6 +148,7 @@ public class BoundedInputStream extends InputStream {
|
|||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressForbidden("just delegating")
|
||||||
public int available() throws IOException {
|
public int available() throws IOException {
|
||||||
if (max>=0 && pos>=max) {
|
if (max>=0 && pos>=max) {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user