Package aQute.bnd.osgi
Class ZipResource
java.lang.Object
aQute.bnd.osgi.ZipResource
- All Implemented Interfaces:
Resource
,Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBuffer
private final boolean
private final ZipEntry
private String
private long
private long
private final ZipFile
-
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
ZipResource
(Path path, String entryName) private
ZipResource
(ZipFile zip, String entryName) (package private)
ZipResource
(ZipFile zip, ZipEntry entry) private
ZipResource
(ZipFile zip, ZipEntry entry, boolean closeZipFile) -
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
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
-
buffer
-
zip
-
entry
-
closeZipFile
private final boolean closeZipFile -
lastModified
private long lastModified -
size
private long size -
extra
-
-
Constructor Details
-
ZipResource
ZipResource(Path path, String entryName) throws IOException - Throws:
IOException
-
ZipResource
- Throws:
IOException
-
ZipResource
-
ZipResource
-
-
Method Details
-
buffer
-
getBuffer
- 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
-