|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpl.pds.server.ChunkedFileHandler
public abstract class ChunkedFileHandler
Abstract querier that chunks product results.
Constructor Summary | |
---|---|
protected |
ChunkedFileHandler()
Creates a new ChunkedFileHandler instance. |
Method Summary | |
---|---|
protected void |
addProduct(String id,
File file,
boolean temporary)
Add a new product. |
void |
close(String id)
Close a chunked file. |
protected File |
getFile(String id)
Get the file corresponding to a product ID. |
byte[] |
retrieveChunk(String id,
long offset,
int length)
Retrieve a chunk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jpl.pds.server.FileQuerier |
---|
queryForFile |
Constructor Detail |
---|
protected ChunkedFileHandler()
ChunkedFileHandler
instance.
Method Detail |
---|
public byte[] retrieveChunk(String id, long offset, int length) throws IOException
FileQuerier
retrieveChunk
in interface FileQuerier
id
- Product ID.offset
- Where to retrieve a fragment.length
- How big a fragment to get.
IOException
- if an error occurs.public void close(String id) throws IOException
FileQuerier
close
in interface FileQuerier
id
- Product ID.
IOException
- if an error occurs.protected File getFile(String id)
id
- Product ID.
File
value.protected void addProduct(String id, File file, boolean temporary)
id
- Product ID.file
- File that contains the product date.temporary
- True if the file is a temporary file, false otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |