org.apache.oodt.xmlquery
Class LargeResult

java.lang.Object
  extended by org.apache.oodt.xmlquery.Result
      extended by org.apache.oodt.xmlquery.LargeResult
All Implemented Interfaces:
Serializable, Cloneable, Documentable

public class LargeResult
extends Result

A large result is a result for large products. What is large? Some might say large is something that exceeds most other things of like kind in bulk, capacity, quantity, superficial dimensions, or number of constituent units. Large might be big, great, capacious, extensive. Large might be opposed to small; as, a large horse; a large house or room; a large lake or pool; a large jug or spoon; a large vineyard; a large army; a large city. Some might say that particularly if they're named Webster.

Version:
$Revision: 1.2 $
Author:
Kelly
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.oodt.xmlquery.Result
codecs, id, INFINITE, mimeType, retriever, value
 
Constructor Summary
LargeResult(Result result)
          Creates a new LargeResult instance.
LargeResult(String id, String mimeType, String profileID, String resourceID, List headers, long size)
          Creates a new LargeResult instance.
 
Method Summary
 InputStream getInputStream()
          Get an input stream that streams the result from the product server.
 String getMimeType()
           
 long getSize()
          Get the size of the product.
 Object getValue()
          Deprecated. This method always treats its value as if it were a String. Worse, for very large results, it cannot contain the entire result in memory. Use getInputStream() instead to perform stream processing on result data.
 
Methods inherited from class org.apache.oodt.xmlquery.Result
clone, equals, getHeaders, getID, getProfileID, getResourceID, getURIID, getValidity, hashCode, isClassified, setClassified, setID, setMimeType, setProfileID, setResourceID, setRetriever, setValidity, setValue, toString, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LargeResult

public LargeResult(Result result)
Creates a new LargeResult instance.

Parameters:
result - a Result value.

LargeResult

public LargeResult(String id,
                   String mimeType,
                   String profileID,
                   String resourceID,
                   List headers,
                   long size)
Creates a new LargeResult instance.

Parameters:
id - Result ID.
mimeType - MIME type.
profileID - Profile ID.
resourceID - Resource ID.
headers - Headers.
size - Size of the product.
Method Detail

getSize

public final long getSize()
Get the size of the product.

Overrides:
getSize in class Result
Returns:
Its size.

getMimeType

public final String getMimeType()
Overrides:
getMimeType in class Result

getValue

public final Object getValue()
Deprecated. This method always treats its value as if it were a String. Worse, for very large results, it cannot contain the entire result in memory. Use getInputStream() instead to perform stream processing on result data.

Return the result's value.

Overrides:
getValue in class Result
Returns:
a String.

getInputStream

public InputStream getInputStream()
                           throws IOException
Get an input stream that streams the result from the product server.

Overrides:
getInputStream in class Result
Returns:
an InputStream value.
Throws:
IOException - if an error occurs.


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