Package aQute.bnd.osgi
Class ZipResource
- java.lang.Object
-
- aQute.bnd.osgi.ZipResource
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBufferbufferprivate booleancloseZipFileprivate java.util.zip.ZipEntryentryprivate java.lang.Stringextraprivate longlastModifiedprivate longsizeprivate java.util.zip.ZipFilezip
-
Constructor Summary
Constructors Modifier Constructor Description (package private)ZipResource(java.nio.file.Path path, java.lang.String entryName)privateZipResource(java.util.zip.ZipFile zip, java.lang.String entryName)(package private)ZipResource(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry)privateZipResource(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry, boolean closeZipFile)
-
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()java.io.InputStreamopenInputStream()voidsetExtra(java.lang.String extra)longsize()java.lang.StringtoString()voidwrite(java.io.OutputStream out)
-
-
-
Constructor Detail
-
ZipResource
ZipResource(java.nio.file.Path path, java.lang.String entryName) throws java.io.IOException- Throws:
java.io.IOException
-
ZipResource
private ZipResource(java.util.zip.ZipFile zip, java.lang.String entryName) throws java.io.IOException- Throws:
java.io.IOException
-
ZipResource
ZipResource(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry)
-
ZipResource
private ZipResource(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry, boolean closeZipFile)
-
-
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
-
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
-
-