Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-202

Document EOF behavior of TarArchiveInputStream

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.5
    • Documentation
    • None

    Description

      When reading from a tar stream getNextEntry() returns null to signify EOF after reading the first EOF record. This leaves the second EOF record in the stream unread potentially confusing subsequent readers or blocking the writer trying to flush the stream in a piped configuration e.g. network streaming.

      The solution to this is to, if you care about subsequent data or true EOF, read from the underlying InputStream until EOF or a protocol record marker.

      It would be nice to have the documentation of TarArchiveInputStream mention that it does not read the stream fully but stops at the first EOF record.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hakkikt Paul Burrowes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: