We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK版本: openjdk_11.0.16 hutool版本: 5.8.27(请确保最新尝试是否还有问题)
public static void main(String[] args) { String read = IoUtil.read(FileUtil.getInputStream("data.json"), StandardCharsets.UTF_8); }
Exception in thread "main" java.lang.NegativeArraySizeException: -221445712 at cn.hutool.core.io.FastByteBuffer.toArray(FastByteBuffer.java:210) at cn.hutool.core.io.FastByteArrayOutputStream.toByteArray(FastByteArrayOutputStream.java:93) at cn.hutool.core.io.IoUtil.readBytes(IoUtil.java:491) at cn.hutool.core.io.IoUtil.readBytes(IoUtil.java:457) at cn.hutool.core.io.IoUtil.read(IoUtil.java:368)
比如报错的Excel文件,有问题的图片等。
The text was updated successfully, but these errors were encountered:
你这个文件太大了,不能一次性读取(超过了byte[]最大容量)
见:https://stackoverflow.com/questions/816142/strings-maximum-length-in-java-calling-length-method
考虑其它读取方式。
Sorry, something went wrong.
No branches or pull requests
版本情况
JDK版本: openjdk_11.0.16
hutool版本: 5.8.27(请确保最新尝试是否还有问题)
问题描述(包括截图)
比如报错的Excel文件,有问题的图片等。
The text was updated successfully, but these errors were encountered: