com.xml_project.morganaxproc.filesystem
Class XProcFilesystem.LoadResult

java.lang.Object
  extended by com.xml_project.morganaxproc.filesystem.XProcFilesystem.LoadResult
Enclosing class:
XProcFilesystem

public static final class XProcFilesystem.LoadResult
extends Object

A class wrapping the results from loading a resource from an uri.


Constructor Summary
XProcFilesystem.LoadResult(String encMethod, byte[] encData, String mimeType, String uri)
          Constructs a new LoadResult
 
Method Summary
 String getEncodedData()
           
 String getEncodingMethod()
          Returns the encoding associated with the loaded uri.
 String getMime()
          Returns the mime type associated with the loaded uri.
 byte[] getRawData()
           
 String getURI()
          Returns the uri from which the LoadResult was loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XProcFilesystem.LoadResult

public XProcFilesystem.LoadResult(String encMethod,
                                  byte[] encData,
                                  String mimeType,
                                  String uri)
Constructs a new LoadResult

Parameters:
encMethod -
encData -
mimeType -
uri -
Method Detail

getEncodingMethod

public String getEncodingMethod()
Returns the encoding associated with the loaded uri.

Returns:
the encoding.

getRawData

public byte[] getRawData()
Returns:
the data associated with the loaded uri. Raw bytes!

getEncodedData

public String getEncodedData()
                      throws IOException
Returns:
Returns the data associated with the loaded uri. (base64 or string)
Throws:
IOException - if base64 encoding is not possible or charset encoding is not supported.

getMime

public String getMime()
Returns the mime type associated with the loaded uri.

Returns:
the mime type.

getURI

public String getURI()
Returns the uri from which the LoadResult was loaded.

Returns:
the uri.