Package aQute.bnd.osgi
Class URLResource
- java.lang.Object
-
- aQute.bnd.osgi.URLResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classURLResource.JarURLUtilUse JarURLConnection to parse jar: URL into URL to jar URL and entry.
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBufferbufferprivate HttpClientclientprivate static java.nio.ByteBufferCLOSEDprivate java.lang.Stringextraprivate longlastModifiedprivate intsizeprivate java.net.URLurl
-
Constructor Summary
Constructors Constructor Description URLResource(java.net.URL url, HttpClient client)This constructor is not for use other than byResource.fromURL(URL).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferbuffer()voidclose()private java.nio.ByteBuffergetBuffer()java.lang.StringgetExtra()longlastModified()private java.io.InputStreamopen()java.io.InputStreamopenInputStream()voidsetExtra(java.lang.String extra)longsize()java.lang.StringtoString()voidwrite(java.io.OutputStream out)
-
-
-
Field Detail
-
CLOSED
private static final java.nio.ByteBuffer CLOSED
-
buffer
private java.nio.ByteBuffer buffer
-
url
private final java.net.URL url
-
client
private final HttpClient client
-
extra
private java.lang.String extra
-
lastModified
private long lastModified
-
size
private int size
-
-
Constructor Detail
-
URLResource
URLResource(java.net.URL url, HttpClient client)This constructor is not for use other than byResource.fromURL(URL).- See Also:
Resource.fromURL(URL)
-
-
Method Detail
-
buffer
public java.nio.ByteBuffer buffer() 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:
openInputStreamin interfaceResource- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
write
public void write(java.io.OutputStream out) throws java.lang.Exception
-
lastModified
public long lastModified()
- Specified by:
lastModifiedin interfaceResource
-
size
public long size() throws java.lang.Exception
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-