Class URLResource

  • All Implemented Interfaces:
    Resource, java.io.Closeable, java.lang.AutoCloseable

    class URLResource
    extends java.lang.Object
    implements Resource
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  URLResource.JarURLUtil
      Use JarURLConnection to parse jar: URL into URL to jar URL and entry.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.ByteBuffer buffer  
      private HttpClient client  
      private static java.nio.ByteBuffer CLOSED  
      private java.lang.String extra  
      private long lastModified  
      private int size  
      private java.net.URL url  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer buffer()  
      void close()  
      private java.nio.ByteBuffer getBuffer()  
      java.lang.String getExtra()  
      long lastModified()  
      private java.io.InputStream open()  
      java.io.InputStream openInputStream()  
      void setExtra​(java.lang.String extra)  
      long size()  
      java.lang.String toString()  
      void write​(java.io.OutputStream out)  
      • Methods inherited from class java.lang.Object

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

      • CLOSED

        private static final java.nio.ByteBuffer CLOSED
      • buffer

        private java.nio.ByteBuffer buffer
      • url

        private final java.net.URL url
      • extra

        private java.lang.String extra
      • lastModified

        private long lastModified
      • size

        private int size
    • Method Detail

      • buffer

        public java.nio.ByteBuffer buffer()
                                   throws java.lang.Exception
        Specified by:
        buffer in interface Resource
        Throws:
        java.lang.Exception
      • getBuffer

        private java.nio.ByteBuffer getBuffer()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • open

        private java.io.InputStream open()
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • openInputStream

        public java.io.InputStream openInputStream()
                                            throws java.lang.Exception
        Specified by:
        openInputStream in interface Resource
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • write

        public void write​(java.io.OutputStream out)
                   throws java.lang.Exception
        Specified by:
        write in interface Resource
        Throws:
        java.lang.Exception
      • getExtra

        public java.lang.String getExtra()
        Specified by:
        getExtra in interface Resource
      • setExtra

        public void setExtra​(java.lang.String extra)
        Specified by:
        setExtra in interface Resource
      • size

        public long size()
                  throws java.lang.Exception
        Specified by:
        size in interface Resource
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException