public interface HttpResource extends Closeable
ResourceServlet
.Modifier and Type | Method and Description |
---|---|
Date |
getLastModified() |
boolean |
isReusable() |
boolean |
isUpdateable() |
long |
makeDigest(MessageDigest md) |
void |
readFromStream(InputStream is)
Update this resource from a stream.
|
void |
writeToStream(OutputStream os)
Copy the resource to an output stream.
|
void writeToStream(OutputStream os) throws IOException
os
- The output stream to write to.IOException
- Upon I/O errors.void readFromStream(InputStream is) throws IOException
isUpdateable()
returns
true
.is
- The input stream to read the updated content from.IOException
long makeDigest(MessageDigest md) throws IOException
md
- A message digest to update with the contents of the
resource.IOException
- Upon I/O errors.Date getLastModified()
null
, if the last modification date is unknown.boolean isReusable()
writeToStream(OutputStream)
and/or
makeDigest(MessageDigest)
may be called
multiple times or the resource has to be resolved
each time it is going to be used.boolean isUpdateable()
readFromStream(InputStream)
is implemented.Copyright © 2018 Clazzes.org. All rights reserved.