at.gv.egovernment.moa.spss.server.invoke
Class ExternalURIResolver

java.lang.Object
  |
  +--at.gv.egovernment.moa.spss.server.invoke.ExternalURIResolver

public class ExternalURIResolver
extends Object

Resolve external URIs and provide them as a stream.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
ExternalURIResolver()
           
 
Method Summary
 String getContentType()
          Return the content type of the data detected at the URI from the previous call of resolve().
 InputStream resolve(String uriStr)
          Return a stream to data at the given URI.
protected  void setContentType(String contentType)
          Set the content type of the data at the URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalURIResolver

public ExternalURIResolver()
Method Detail

resolve

public InputStream resolve(String uriStr)
                    throws MOAApplicationException
Return a stream to data at the given URI. This method will try to open an URLConnection to the given URI. Access to the file system is disallowed.
Parameters:
uriStr - The URI to resolve.
Returns:
InputStream The data contained at the URI.
Throws:
MOAApplicationException - An error occurred resolving the URI (e.g., the URI is syntactically incorrect or the stream could not be opened).

setContentType

protected void setContentType(String contentType)
Set the content type of the data at the URI.
Parameters:
contentType - The content type to set.

getContentType

public String getContentType()
Return the content type of the data detected at the URI from the previous call of resolve().
Returns:
String The content type.