Package aQute.bnd.osgi
Class ZipResource
- java.lang.Object
-
- aQute.bnd.osgi.ZipResource
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffer
buffer
private boolean
closeZipFile
private java.util.zip.ZipEntry
entry
private java.lang.String
extra
private long
lastModified
private long
size
private java.util.zip.ZipFile
zip
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
ZipResource(java.nio.file.Path path, java.lang.String entryName)
private
ZipResource(java.util.zip.ZipFile zip, java.lang.String entryName)
(package private)
ZipResource(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry)
private
ZipResource(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.ByteBuffer
buffer()
void
close()
private java.nio.ByteBuffer
getBuffer()
java.lang.String
getExtra()
long
lastModified()
java.io.InputStream
openInputStream()
void
setExtra(java.lang.String extra)
long
size()
java.lang.String
toString()
void
write(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:
openInputStream
in interfaceResource
- Throws:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
write
public void write(java.io.OutputStream out) throws java.lang.Exception
-
lastModified
public long lastModified()
- Specified by:
lastModified
in interfaceResource
-
size
public long size() throws java.lang.Exception
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-