[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] alphacome updated COMPRESS-417: --- Attachment: (was: 2102.+0800-2102.0015+0800_0.tar.gz) > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Labels: tar > Fix For: 1.15 > > > {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated COMPRESS-417: Fix Version/s: 1.15 > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Labels: tar > Fix For: 1.15 > > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated COMPRESS-417: Labels: tar (was: ) > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Labels: tar > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated COMPRESS-417: Component/s: (was: Compressors) Archivers > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Archivers >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated COMPRESS-417: Description: {code:java} public static void deGzipArchive(String filepath,String dir) throws Exception { final File input = new File(filepath); final InputStream is = new FileInputStream(input); final CompressorInputStream in = new GzipCompressorInputStream(is, true); TarArchiveInputStream tin = new TarArchiveInputStream(in); TarArchiveEntry entry = tin.getNextTarEntry(); while (entry != null) { File archiveEntry = new File(dir, entry.getName()); archiveEntry.getParentFile().mkdirs(); if (entry.isDirectory()) { archiveEntry.mkdir(); entry = tin.getNextTarEntry(); continue; } OutputStream out = new FileOutputStream(archiveEntry); IOUtils.copy(tin, out); out.close(); entry = tin.getNextTarEntry(); } in.close(); tin.close(); } public static void main(String[] args) throws Exception { Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); } {code} the tar.gz file can be decompressed in linux environment use 'tar' command. The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more was: the tar.gz file can be decompressed in linux environment use 'tar' command. The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Compressors >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > cont
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig updated COMPRESS-417: Environment: (was: {code:java} public static void deGzipArchive(String filepath,String dir) throws Exception { final File input = new File(filepath); final InputStream is = new FileInputStream(input); final CompressorInputStream in = new GzipCompressorInputStream(is, true); TarArchiveInputStream tin = new TarArchiveInputStream(in); TarArchiveEntry entry = tin.getNextTarEntry(); while (entry != null) { File archiveEntry = new File(dir, entry.getName()); archiveEntry.getParentFile().mkdirs(); if (entry.isDirectory()) { archiveEntry.mkdir(); entry = tin.getNextTarEntry(); continue; } OutputStream out = new FileOutputStream(archiveEntry); IOUtils.copy(tin, out); out.close(); entry = tin.getNextTarEntry(); } in.close(); tin.close(); } public static void main(String[] args) throws Exception { Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); } {code} ) > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Compressors >Affects Versions: 1.14 >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] alphacome updated COMPRESS-417: --- Description: the tar.gz file can be decompressed in linux environment use 'tar' command. The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more was: The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Compressors >Affects Versions: 1.14 > Environment: {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > the tar.gz file can be decompressed in linux environment use 'tar' command. > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.c
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] alphacome updated COMPRESS-417: --- Attachment: 2102.+0800-2102.0015+0800_0.tar.gz the tar.gz file! > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Compressors >Affects Versions: 1.14 > Environment: {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > Can't upload tar.gz file? > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) > ... 2 more > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] alphacome updated COMPRESS-417: --- Description: The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more was: Can't upload tar.gz file? The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRESS-417 > Project: Commons Compress > Issue Type: Bug > Components: Compressors >Affects Versions: 1.14 > Environment: {code:java} > public static void deGzipArchive(String filepath,String dir) > throws Exception { > final File input = new File(filepath); > final InputStream is = new FileInputStream(input); > final CompressorInputStream in = new GzipCompressorInputStream(is, > true); > TarArchiveInputStream tin = new TarArchiveInputStream(in); > TarArchiveEntry entry = tin.getNextTarEntry(); > while (entry != null) { > File archiveEntry = new File(dir, entry.getName()); > archiveEntry.getParentFile().mkdirs(); > if (entry.isDirectory()) { > archiveEntry.mkdir(); > entry = tin.getNextTarEntry(); > continue; > } > OutputStream out = new FileOutputStream(archiveEntry); > IOUtils.copy(tin, out); > out.close(); > entry = tin.getNextTarEntry(); > } > in.close(); > tin.close(); > } > public static void main(String[] args) throws Exception { > > Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); > } > {code} >Reporter: alphacome >Priority: Critical > Attachments: 2102.+0800-2102.0015+0800_0.tar.gz > > > The error log: > Exception in thread "main" java.io.IOException: Error detected parsing the > header > at > org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) > at gztest.deGzipArchive(gztest.java:23) > at gztest.main(gztest.java:149) > Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 > in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) > at > org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) > at > org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) > at > org.apache.commons.compress.archiv
[jira] [Updated] (COMPRESS-417) Decompress tar.gz file failed. java.io.Exception:Error detected parsing the header
[ https://issues.apache.org/jira/browse/COMPRESS-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] alphacome updated COMPRESS-417: --- Environment: {code:java} public static void deGzipArchive(String filepath,String dir) throws Exception { final File input = new File(filepath); final InputStream is = new FileInputStream(input); final CompressorInputStream in = new GzipCompressorInputStream(is, true); TarArchiveInputStream tin = new TarArchiveInputStream(in); TarArchiveEntry entry = tin.getNextTarEntry(); while (entry != null) { File archiveEntry = new File(dir, entry.getName()); archiveEntry.getParentFile().mkdirs(); if (entry.isDirectory()) { archiveEntry.mkdir(); entry = tin.getNextTarEntry(); continue; } OutputStream out = new FileOutputStream(archiveEntry); IOUtils.copy(tin, out); out.close(); entry = tin.getNextTarEntry(); } in.close(); tin.close(); } public static void main(String[] args) throws Exception { Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); } {code} was: {code:java} public static void deGzipArchive(String filepath,String dir) throws Exception { final File input = new File(filepath); final InputStream is = new FileInputStream(input); final CompressorInputStream in = new GzipCompressorInputStream(is, true); TarArchiveInputStream tin = new TarArchiveInputStream(in); TarArchiveEntry entry = tin.getNextTarEntry(); while (entry != null) { File archiveEntry = new File(dir, entry.getName()); archiveEntry.getParentFile().mkdirs(); if (entry.isDirectory()) { archiveEntry.mkdir(); entry = tin.getNextTarEntry(); continue; } OutputStream out = new FileOutputStream(archiveEntry); IOUtils.copy(tin, out); out.close(); entry = tin.getNextTarEntry(); } in.close(); tin.close(); } public static void main(String[] args) throws Exception { Gztest.deGzipArchive("D:/2102.+0800-2102.0015+0800_0.tar.gz","D:/"); } {code} Description: Can't upload tar.gz file? The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more was: The error log: Exception in thread "main" java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:286) at gztest.deGzipArchive(gztest.java:23) at gztest.main(gztest.java:149) Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'dos{NUL}{NUL}{NUL}{NUL}{NUL}' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:141) at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:171) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1128) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1091) at org.apache.commons.compress.archivers.tar.TarArchiveEntry.(TarArchiveEntry.java:368) at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:284) ... 2 more > Decompress tar.gz file failed. java.io.Exception:Error detected parsing the > header > -- > > Key: COMPRESS-417 > URL: https://issues.apache.org/jira/browse/COMPRE