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