org.apache.oodt.product.handlers.ofsn
Class StdOFSNGetHandler

java.lang.Object
  extended by org.apache.oodt.product.handlers.ofsn.StdOFSNGetHandler
All Implemented Interfaces:
OFSNGetHandler

public class StdOFSNGetHandler
extends Object
implements OFSNGetHandler

Standard way of retrieving a file without performing any transformation on it.

Version:
$Revision$
Author:
mattmann

Constructor Summary
StdOFSNGetHandler()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdOFSNGetHandler

public StdOFSNGetHandler()
Method Detail

retrieveChunk

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

Specified by:
retrieveChunk in interface OFSNGetHandler
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

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

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

configure

public void configure(Properties conf)
Description copied from interface: OFSNGetHandler
Configures this handler with the provided configuration stored in a Properties object.

Specified by:
configure in interface OFSNGetHandler
Parameters:
conf - The configuration for this list handler.


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