org.apache.oodt.product.handlers.ofsn
Interface OFSNGetHandler

All Known Implementing Classes:
MD5GetHandler, StdOFSNGetHandler, URLGetHandler

public interface OFSNGetHandler

The default OFSN handler for getting remote data.

Version:
$Revision$
Author:
mattmann

Method Summary
 void configure(Properties conf)
          Configures this handler with the provided configuration stored in a Properties object.
 byte[] retrieveChunk(String filepath, long offset, int length)
          Retrieves a chunk of data from the remote file.
 long sizeOf(String filepath)
          Returns the size of the remote data, which may be the entire file in question, or some subset/transformation on it.
 

Method Detail

retrieveChunk

byte[] retrieveChunk(String filepath,
                     long offset,
                     int length)
                     throws ProductException
Retrieves a chunk of data from the remote file.

Parameters:
filepath - The path to the remote file.
offset - The offset in the remote data to retrieve.
length - The length of data to read
Returns:
The byte[] data, read, or null otherwise.
Throws:
ProductException - If any error occurs.

sizeOf

long sizeOf(String filepath)
Returns the size of the remote data, which may be the entire file in question, or some subset/transformation on it.

Parameters:
filepath - The remote file in question.
Returns:
The size of the remote file, potentially after a remote transformation has occured.

configure

void configure(Properties conf)
Configures this handler with the provided configuration stored in a Properties object.

Parameters:
conf - The configuration for this list handler.


Copyright © 1999-2013 Apache OODT. All Rights Reserved.