Class TarArchiveSparseZeroInputStream

java.lang.Object
java.io.InputStream
org.apache.commons.compress.archivers.tar.TarArchiveSparseZeroInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

class TarArchiveSparseZeroInputStream extends InputStream
This is an inputstream that always return 0, this is used when reading the "holes" of a sparse file
  • Constructor Details

    • TarArchiveSparseZeroInputStream

      TarArchiveSparseZeroInputStream()
  • Method Details

    • read

      public int read() throws IOException
      Just return 0
      Specified by:
      read in class InputStream
      Returns:
      Throws:
      IOException
    • skip

      public long skip(long n)
      these's nothing need to do when skipping
      Overrides:
      skip in class InputStream
      Parameters:
      n - bytes to skip
      Returns:
      bytes actually skipped