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

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected B asThis()
      Returns this instance typed as the proper subclass type.
      protected java.nio.file.Path checkPath()  
      abstract R get()
      Gets the archive reader.
      B setByteArray​(byte[] origin)
      Sets a new origin.
      B setCharset​(java.lang.String charset)
      Sets the Charset.
      B setCharset​(java.nio.charset.Charset charset)
      Sets the Charset.
      B setFile​(java.io.File origin)
      Sets a new origin.
      B setFile​(java.lang.String origin)
      Sets a new origin.
      B setOpenOptions​(java.nio.file.OpenOption... openOptions)
      Sets the OpenOption[].
      B setOriginDescription​(java.lang.String description)
      Set the origin description.
      B setPath​(java.lang.String origin)
      Sets a new origin.
      B setPath​(java.nio.file.Path origin)
      Sets a new origin.
      B setSeekableByteChannel​(java.nio.channels.SeekableByteChannel origin)
      Sets a new origin.
      B setURI​(java.net.URI origin)
      Sets a new origin.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_CHARSET

        private static final java.nio.charset.Charset DEFAULT_CHARSET
      • DEFAULT_OPEN_OPTIONS

        protected static final java.nio.file.OpenOption[] DEFAULT_OPEN_OPTIONS
      • openOptions

        protected java.nio.file.OpenOption[] openOptions
      • charset

        protected java.nio.charset.Charset charset
      • originDescription

        protected java.lang.String originDescription
      • seekableByteChannel

        protected java.nio.channels.SeekableByteChannel seekableByteChannel
      • path

        protected java.nio.file.Path path
    • Constructor Detail

      • ArchiveReaderBuilder

        public ArchiveReaderBuilder()
    • Method Detail

      • checkPath

        protected java.nio.file.Path checkPath()
      • setCharset

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

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

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

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

        public final B setSeekableByteChannel​(java.nio.channels.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​(java.io.File origin)
        Sets a new origin.
        Parameters:
        origin - the new origin.
        Returns:
        this instance.
      • setFile

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

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

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

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

        public abstract R get()
                       throws java.io.IOException
        Gets the archive reader.
        Returns:
        a result.
        Throws:
        java.io.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.