hello,developers,
when I use MiGzInputStream with availableProcessors(), it happened some exception. For example: OOM or IndexOutBounds. My code is:
int threadCount = Runtime.getRuntime().availableProcessors();
ByteArrayInputStream in = new ByteArrayInputStream(compressedBytes);
MiGzInputStream miGzInputStream = new MiGzInputStream(inputStream, threadCount);
ByteArrayOutputStream out = new ByteArrayOutputStream();
MiGzBuffer buffer;
while ((buffer = miGzInputStream.readBuffer()) != null) {
out.write(buffer.getData(), 0, buffer.getLength());
}
out.close();
hello,developers, when I use MiGzInputStream with availableProcessors(), it happened some exception. For example: OOM or IndexOutBounds. My code is:
And how I can resolve it? Thanks