|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StreamableResource
Abstracts around a Resource to allow access to the resource's content either
compressed on uncompressed. The advantage is that, for cmpressed streams, the data is only compressed once, rather
than for each request.
| Method Summary | |
|---|---|
String |
getContentType()
Returns the content type available from the underlying URLConnection, which may be null. |
long |
getLastModified()
Returns the time the underlying file was last modified. |
int |
getSize(boolean compress)
Returns the size of the content |
InputStream |
getStream(boolean compress)
Returns the raw input stream (wrapped in a BufferedInputStream, or the compressed bytestream. |
| Method Detail |
|---|
String getContentType()
throws IOException
URLConnection, which may be null.
IOException
int getSize(boolean compress)
throws IOException
compress - if true, return size of compressed content
IOException
InputStream getStream(boolean compress)
throws IOException
BufferedInputStream, or the compressed bytestream.
compress - if true, return compressed version
IOException
long getLastModified()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||