0

我的代码是:

try {             
                        // De-serialize it!
                        ByteArrayInputStream fis = new 
                        ByteArrayInputStream(serFile);
                        GZIPInputStream gzis = new GZIPInputStream(fis);
                        ObjectInputStream ois = new ObjectInputStream(gzis);                
                        reptDef = (AdHocReportDefinition)ois.readObject();                  


                    }

读取序列化文件时,我在 ObjectInputStream 上收到此错误。

 java.io.EOFException: Unexpected end of ZLIB input stream
        at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:234)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
        at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:101)
        at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2307)
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2320)
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2791)
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:795)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:293)
4

0 回答 0