Class ArjArchiveInputStream

    • Constructor Detail

      • ArjArchiveInputStream

        public ArjArchiveInputStream(InputStream inputStream,
                                     String charsetName)
                              throws ArchiveException
        Constructs the ArjInputStream, taking ownership of the inputStream that is passed in.
        Parameters:
        inputStream - the underlying stream, whose ownership is taken
        charsetName - the charset used for file names and comments in the archive
        Throws:
        ArchiveException -
      • ArjArchiveInputStream

        public ArjArchiveInputStream(InputStream inputStream)
                              throws ArchiveException
        Constructs the ArjInputStream, taking ownership of the inputStream that is passed in, and using the CP437 character encoding.
        Parameters:
        inputStream - the underlying stream, whose ownership is taken
        Throws:
        ArchiveException -
    • Method Detail

      • matches

        public static boolean matches(byte[] signature,
                                      int length)
        Checks if the signature matches what is expected for an arj file.
        Parameters:
        signature - the bytes to check
        length - the number of bytes to check
        Returns:
        true, if this stream is an arj archive stream, false otherwise
      • getArchiveName

        public String getArchiveName()
        Gets the archive's recorded name.
      • getArchiveComment

        public String getArchiveComment()
        Gets the archive's comment.
      • canReadEntryData

        public boolean canReadEntryData(ArchiveEntry ae)
        Description copied from class: ArchiveInputStream
        Whether this stream is able to read the given entry.

        Some archive formats support variants or details that are not supported (yet).

        Overrides:
        canReadEntryData in class  ArchiveInputStream
        Parameters:
        ae - the entry to test
        Returns:
        This implementation always returns true.