commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Grobmeier (JIRA)" <>
Subject [jira] Created: (SANDBOX-305) CPIO reports unexpected EOF
Date Fri, 20 Mar 2009 06:38:50 GMT
CPIO reports unexpected EOF

                 Key: SANDBOX-305
             Project: Commons Sandbox
          Issue Type: Bug
          Components: Compress
            Reporter: Christian Grobmeier

When unpacking an CPIO archive (made with the compress classes or even made with OSX cpio
comandline tool) an EOF exception is thrown.
Here is the testcode:

        final File input = getFile("cmdcreated.cpio");

        final InputStream in = new FileInputStream(input);
        CpioArchiveInputStream cin = new CpioArchiveInputStream(in);

        CpioArchiveEntry entry = null;

        while ((entry = (CpioArchiveEntry) cin.getNextCPIOEntry()) != null) {
            File target = new File(dir, entry.getName());
            final OutputStream out = new FileOutputStream(target);
            IOUtils.copy(in, out);


Stacktrace is here:
	at org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream.readFully(
	at org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream.getNextCPIOEntry(
	at org.apache.commons.compress.archivers.cpio.CpioArchiveInputStreamTest.testCpioUnpack(

This happens with the first read access to the archive. It occured while my try to improve
the testcases.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message