public abstract class AbstractResource extends java.lang.Object implements Resource
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
buffer |
private java.lang.String |
extra |
private long |
lastModified |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource(long modified) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
buffer() |
void |
close() |
private java.nio.ByteBuffer |
getBuffer() |
protected abstract byte[] |
getBytes() |
java.lang.String |
getExtra() |
long |
lastModified() |
java.io.InputStream |
openInputStream() |
void |
setExtra(java.lang.String extra) |
long |
size() |
void |
write(java.io.OutputStream out) |
private java.lang.String extra
private java.nio.ByteBuffer buffer
private final long lastModified
public long lastModified()
lastModified in interface Resourcepublic java.io.InputStream openInputStream()
throws java.lang.Exception
openInputStream in interface Resourcejava.lang.Exceptionprivate java.nio.ByteBuffer getBuffer()
throws java.lang.Exception
java.lang.Exceptionpublic java.nio.ByteBuffer buffer()
throws java.lang.Exception
public void write(java.io.OutputStream out)
throws java.lang.Exception
protected abstract byte[] getBytes()
throws java.lang.Exception
java.lang.Exceptionpublic long size()
throws java.lang.Exception
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException