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 class
Use JarURLConnection to parse jar: URL into URL to jar URL and entry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBuffer
private final HttpClient
private static final ByteBuffer
private String
private long
private int
private 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()
void
close()
private ByteBuffer
getExtra()
UseResource.decodeExtra(String)
to properly decode the ZIP extra field structured binary data from the returned String.long
private InputStream
open()
void
UseResource.encodeExtra(byte[])
to properly encode the ZIP extra field structured binary data into the specified String.long
size()
toString()
void
write
(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:
openInputStream
in interfaceResource
- Throws:
Exception
-
toString
-
write
-
lastModified
public long lastModified()- Specified by:
lastModified
in interfaceResource
-
getExtra
Description copied from interface:Resource
UseResource.decodeExtra(String)
to properly decode the ZIP extra field structured binary data from the returned String. -
setExtra
Description copied from interface:Resource
UseResource.encodeExtra(byte[])
to properly encode the ZIP extra field structured binary data into the specified String. -
size
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-