Class RpmArchiveInputStream

java.lang.Object
java.io.InputStream
org.apache.commons.compress.archivers.ArchiveInputStream<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry>
io.kojan.javadeptools.rpm.RpmArchiveInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class RpmArchiveInputStream extends org.apache.commons.compress.archivers.ArchiveInputStream<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry>
A class for reading RPM package as an archive.
Author:
Mikolaj Izdebski
  • Constructor Details

    • RpmArchiveInputStream

      public RpmArchiveInputStream(Path path) throws IOException
      Opens RPM package from disk as ArchiveInputStream
      Parameters:
      path - path to a file to read as RPM package
      Throws:
      IOException - when given file is not a valid RPM package or when I/O error occurs reading package from disk
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException
    • getNextEntry

      public org.apache.commons.compress.archivers.cpio.CpioArchiveEntry getNextEntry() throws IOException
      Specified by:
      getNextEntry in class org.apache.commons.compress.archivers.ArchiveInputStream<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry>
      Throws:
      IOException
    • read

      public int read() throws IOException
      Overrides:
      read in class org.apache.commons.compress.archivers.ArchiveInputStream<org.apache.commons.compress.archivers.cpio.CpioArchiveEntry>
      Throws:
      IOException
    • read

      public int read(byte[] buf) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] buf, int off, int len) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException