The following error occurred while extracting the War/jar file:
Java.util.zip.ZipException:invalid distance too far back
At Org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readFromInflater (Ziparchiveinputstream.java : 478)
At org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDeflated (ziparchiveinputstream.java:443)
At Org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read (ziparchiveinputstream.java:384)
At Java.io.InputStream.read (Unknown Source)
At Org.apache.commons.compress.utils.IOUtils.copy (ioutils.java:75)
At Org.apache.commons.compress.utils.IOUtils.copy (ioutils.java:56)
At Com.xunge.aesfileencoder$1.run (aesfileencoder.java:149)
At Java.lang.Thread.run (Unknown Source)
caused by:java.util.zip.DataFormatException:invalid distance too far back
At Java.util.zip.Inflater.inflateBytes (Native Method)
At Java.util.zip.Inflater.inflate (Unknown Source)
At Org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readFromInflater (Ziparchiveinputstream.java : 476)
... 7 more
Related code:
PipedInputStream pin =NewPipedInputStream (); PipedOutputStream pout =NewPipedOutputStream (PIN);NewThread (NewRunnable () { Public void Run() {Try{ioutils.copy (AIS, pout); Pout.close (); }Catch(IOException e) {//TODO auto-generated catch blockE.printstacktrace (); }}). Start (); Archiveinputstream Injar =NewArchivestreamfactory (). Createarchiveinputstream (Archivestreamfactory.jar, PIN);
The above code is no problem if you use the PIN code and the pin's declaration code is spaced out too much code in this exception. Specifically, there is no test, it may be the reason for a logical judgment statement.
Java.util.zip.DataFormatException:invalid distance too far back