java.io.EOFException的问题

今天调程序的时候,报java.io.EOFException: null

at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264) ~[na:1.7.0_55]
at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254) ~[na:1.7.0_55]
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163) ~[na:1.7.0_55]
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78) ~[na:1.7.0_55]
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90) ~[na:1.7.0_55]
at com.eversec.smci.utils.ZipUtil.unZipByGZIP(ZipUtil.java:259) ~[dnsfileoperate-0.0.1.jar:0.0.1]
at com.eversec.smci.fileoperate.input.XmlFileInputHandler.run(XmlFileInputHandler.java:101) [dnsfileoperate-0.0.1.jar:0.0.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_55]

最后定位原因为:客户端上传文件后缀名为.gz,服务器自动解析.gz文件,文件并没有上传完,服务器就开始解析了,所以报错。

 

posted @ 2017-09-22 20:47  Twelve_Eleven  阅读(3802)  评论(0编辑  收藏  举报