Class TarArchiveInputStream.TarArchiveSparseZeroInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    TarArchiveInputStream

    private static class TarArchiveInputStream.TarArchiveSparseZeroInputStream
    extends java.io.InputStream
    This is an inputstream that always return 0, this is used when reading the "holes" of a sparse file
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int read()
      Just return 0
      long skip​(long n)
      these's nothing need to do when skipping
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TarArchiveSparseZeroInputStream

        private TarArchiveSparseZeroInputStream()
    • Method Detail

      • read

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

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