Class AbstractOrigin.URIOrigin

    • Constructor Detail

      • URIOrigin

        public URIOrigin​(java.net.URI origin)
        Constructs a new instance for the given origin.
        Parameters:
        origin - The origin, not null.
        Throws:
        java.lang.NullPointerException - if origin is null.
    • Method Detail

      • getChannel

        protected java.nio.channels.Channel getChannel​(java.nio.file.OpenOption... options)
                                                throws java.io.IOException
        Gets this origin as a Channel, if possible.
        Overrides:
        getChannel in class AbstractOrigin<java.net.URI,​AbstractOrigin.URIOrigin>
        Parameters:
        options - Options specifying how a file-based origin is opened, ignored otherwise.
        Returns:
        A new Channel on the origin.
        Throws:
        java.io.IOException - If an I/O error occurs.
        See Also:
        AbstractOrigin.URIOrigin.URIOpenOption
      • getInputStream

        private java.io.InputStream getInputStream​(java.net.URI uri,
                                                   java.nio.file.OpenOption... options)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • toMillis

        private int toMillis​(java.time.Duration duration)