Class ArchiveReaderBuilder<R,B extends ArchiveReaderBuilder<R,B>>

java.lang.Object
kala.compress.archivers.ArchiveReaderBuilder<R,B>
Direct Known Subclasses:
SevenZArchiveReader.Builder, ZipArchiveReader.Builder

public abstract class ArchiveReaderBuilder<R,B extends ArchiveReaderBuilder<R,B>> extends Object
Since:
1.27.1-0
  • Field Details

    • DEFAULT_CHARSET

      private static final Charset DEFAULT_CHARSET
    • DEFAULT_OPEN_OPTIONS

      protected static final OpenOption[] DEFAULT_OPEN_OPTIONS
    • openOptions

      protected OpenOption[] openOptions
    • charset

      protected Charset charset
    • originDescription

      protected String originDescription
    • seekableByteChannel

      protected SeekableByteChannel seekableByteChannel
    • path

      protected Path path
  • Constructor Details

    • ArchiveReaderBuilder

      public ArchiveReaderBuilder()
  • Method Details

    • checkPath

      protected Path checkPath()
    • setCharset

      public final B setCharset(Charset charset)
      Sets the Charset.
      Parameters:
      charset - the Charset, null resets to the default.
      Returns:
      this instance.
    • setCharset

      public final B setCharset(String charset)
      Sets the Charset.
      Parameters:
      charset - the Charset, null resets to the default.
      Returns:
      this instance.
    • setOpenOptions

      public final B setOpenOptions(OpenOption... openOptions)
      Sets the OpenOption[].
      Parameters:
      openOptions - the OpenOption[] name, null resets to the default.
      Returns:
      this instance.
    • setOriginDescription

      public final B setOriginDescription(String description)
      Set the origin description.
      Parameters:
      description - the origin description, null resets to the default..
      Returns:
      this instance.
    • setSeekableByteChannel

      public final B setSeekableByteChannel(SeekableByteChannel origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setByteArray

      public final B setByteArray(byte[] origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setFile

      public final B setFile(File origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setFile

      public final B setFile(String origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setPath

      public final B setPath(Path origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setPath

      public final B setPath(String origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • setURI

      public final B setURI(URI origin)
      Sets a new origin.
      Parameters:
      origin - the new origin.
      Returns:
      this instance.
    • get

      public abstract R get() throws IOException
      Gets the archive reader.
      Returns:
      a result.
      Throws:
      IOException - if an I/O error occurs.
    • asThis

      protected final B asThis()
      Returns this instance typed as the proper subclass type.
      Returns:
      this instance typed as the proper subclass type.