Package aQute.bnd.osgi
Class ZipResource
java.lang.Object
aQute.bnd.osgi.ZipResource
- All Implemented Interfaces:
Resource,Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate final booleanprivate final ZipEntryprivate Stringprivate longprivate longprivate final ZipFile -
Constructor Summary
ConstructorsModifierConstructorDescription(package private)ZipResource(Path path, String entryName) privateZipResource(ZipFile zip, String entryName) (package private)ZipResource(ZipFile zip, ZipEntry entry) privateZipResource(ZipFile zip, ZipEntry entry, boolean closeZipFile) -
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.longvoidUseResource.encodeExtra(byte[])to properly encode the ZIP extra field structured binary data into the specified String.longsize()toString()voidwrite(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:
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
-