Package aQute.bnd.osgi
Class URLResource
java.lang.Object
aQute.bnd.osgi.URLResource
- All Implemented Interfaces:
Resource,Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classUse JarURLConnection to parse jar: URL into URL to jar URL and entry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate final HttpClientprivate static final ByteBufferprivate Stringprivate longprivate intprivate final URL -
Constructor Summary
ConstructorsConstructorDescriptionURLResource(URL url, HttpClient client) This constructor is not for use other than byResource.fromURL(URL). -
Method Summary
Modifier and TypeMethodDescriptionbuffer()voidclose()private ByteBuffergetExtra()UseResource.decodeExtra(String)to properly decode the ZIP extra field structured binary data from the returned String.longprivate InputStreamopen()voidUseResource.encodeExtra(byte[])to properly encode the ZIP extra field structured binary data into the specified String.longsize()toString()voidwrite(OutputStream out)
-
Field Details
-
CLOSED
-
buffer
-
url
-
client
-
extra
-
lastModified
private long lastModified -
size
private int size
-
-
Constructor Details
-
URLResource
URLResource(URL url, HttpClient client) This constructor is not for use other than byResource.fromURL(URL).- See Also:
-
-
Method Details
-
buffer
-
getBuffer
- Throws:
Exception
-
open
- Throws:
Exception
-
openInputStream
- Specified by:
openInputStreamin interfaceResource- Throws:
Exception
-
toString
-
write
-
lastModified
public long lastModified()- Specified by:
lastModifiedin interfaceResource
-
getExtra
Description copied from interface:ResourceUseResource.decodeExtra(String)to properly decode the ZIP extra field structured binary data from the returned String. -
setExtra
Description copied from interface:ResourceUseResource.encodeExtra(byte[])to properly encode the ZIP extra field structured binary data into the specified String. -
size
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-