add additional exception info to failing IOUtils.toByteArray

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1830779 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2018-05-02 17:29:24 +00:00
parent 066a8a0b42
commit 17fdb3188c

View File

@ -166,7 +166,7 @@ public final class IOUtils {
}
if (len != Integer.MAX_VALUE && totalBytes < len) {
throw new EOFException("unexpected EOF");
throw new EOFException("unexpected EOF - expected len: "+len+" - actual len: "+totalBytes);
}
return baos.toByteArray();