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 Resource
public java.io.InputStream openInputStream() throws java.lang.Exception
openInputStream
in interface Resource
java.lang.Exception
private java.nio.ByteBuffer getBuffer() throws java.lang.Exception
java.lang.Exception
public 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.Exception
public long size() throws java.lang.Exception
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException