简体   繁体   English

Java调用因未捕获的Java异常而终止:java.lang.RuntimeException:java.io.EOFException:ZLIB输入流的意外结束

[英]Java call terminated by uncaught Java exception: java.lang.RuntimeException: java.io.EOFException: Unexpected end of ZLIB input stream

I am getting this error when size of ZipInputStream is more than 1 Gb but it is working fine for 500mb data; 当ZipInputStream的大小大于1 Gb,但对于500mb数据工作正常时,我会收到此错误;

Java call terminated by uncaught Java exception: java.lang.RuntimeException: java.io.EOFException: Unexpected end of ZLIB input stream Java调用因未捕获的Java异常而终止:java.lang.RuntimeException:java.io.EOFException:ZLIB输入流的意外结束

conn = (oracle.jdbc.OracleConnection)new OracleDriver().defaultConnection();
        newBlob=conn.createBlob();
        InputStream is = blob.getBinaryStream();
        ZipInputStream zis = new ZipInputStream(is);
        //get the zipped file list entry
        ZipEntry ze = zis.getNextEntry();
        while (ze != null) {
            OutputStream os = newBlob.setBinaryStream(1);
            while (zis.available() != 0) {
                os.write(zis.read());
            }
            os.flush();
            ze = zis.getNextEntry();
        }
        zis.closeEntry();
        zis.close();

But if I am using 但是如果我正在使用
newBlob = BLOB.createTemporary(conn, false,oracle.sql.BLOB.DURATION_SESSION); newBlob = BLOB.createTemporary(conn,false,oracle.sql.BLOB.DURATION_SESSION); this, then it is working fine. 这个,然后工作正常。

Please Help. 请帮忙。 Thanks in advance 提前致谢

使用InputStream.available()不是检测文件结尾的正确方法: InputStream.available()不起作用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.io.EOFException:ZLIB 输入流意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream java.io.EOFException:ZLIB 输入 stream 的意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream during reading stream data java.io.EOFException:读取gzip编码网站的ZLIB输入流意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream reading gzip encoded website java.io.EOFException:ZLIB输入流的意外结尾读取文件 - java.io.EOFException: Unexpected end of ZLIB input stream reading a file java.io.EOFException:ZLIB 输入 stream 的意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream - reading from HTTP java.io.EOFException:在try-with-resources中使用ByteArrayOutputStream时ZLIB输入流的意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream when using ByteArrayOutputStream in try-with-resources java.io.EOFException:使用 Apache POI 的 ZLIB 输入流意外结束 - java.io.EOFException: Unexpected end of ZLIB input stream using Apache POI 在使用ImageIO.read()时如何弃用'java.io.EOFException:ZLIB输入流的意外结束' - How to soleve 'java.io.EOFException: Unexpected end of ZLIB input stream' while use ImageIO.read() java.io.EOFException:PartialInputStream中流的过早结束 - bouncy Castle - java.io.EOFException: premature end of stream in PartialInputStream - bouncy Castle TwelveMonkeys 3.1.1:PSD文件ImageIO.read给出java.io.EOFException:PackBits流的意外结束 - TwelveMonkeys 3.1.1: PSD file ImageIO.read gives java.io.EOFException: Unexpected end of PackBits stream
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM