Package aQute.bnd.osgi
Class AbstractResource
- java.lang.Object
-
- aQute.bnd.osgi.AbstractResource
-
- All Implemented Interfaces:
Resource,java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
PreprocessResource
public abstract class AbstractResource extends java.lang.Object implements Resource
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResource(long modified)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferbuffer()voidclose()protected abstract byte[]getBytes()java.lang.StringgetExtra()UseResource.decodeExtra(String)to properly decode the ZIP extra field structured binary data from the returned String.longlastModified()java.io.InputStreamopenInputStream()voidsetExtra(java.lang.String extra)UseResource.encodeExtra(byte[])to properly encode the ZIP extra field structured binary data into the specified String.longsize()voidwrite(java.io.OutputStream out)
-
-
-
Method Detail
-
getExtra
public java.lang.String getExtra()
Description copied from interface:ResourceUseResource.decodeExtra(String)to properly decode the ZIP extra field structured binary data from the returned String.
-
lastModified
public long lastModified()
- Specified by:
lastModifiedin interfaceResource
-
openInputStream
public java.io.InputStream openInputStream() throws java.lang.Exception- Specified by:
openInputStreamin interfaceResource- Throws:
java.lang.Exception
-
buffer
public java.nio.ByteBuffer buffer() throws java.lang.Exception
-
setExtra
public void setExtra(java.lang.String extra)
Description copied from interface:ResourceUseResource.encodeExtra(byte[])to properly encode the ZIP extra field structured binary data into the specified String.
-
write
public void write(java.io.OutputStream out) throws java.lang.Exception
-
getBytes
protected abstract byte[] getBytes() throws java.lang.Exception- Throws:
java.lang.Exception
-
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
-
-