public class UnparsedTextResource extends Object implements Resource
| Modifier and Type | Field and Description |
|---|---|
static ResourceFactory |
FACTORY |
| Constructor and Description |
|---|
UnparsedTextResource(String href,
AbstractResourceCollection.InputDetails details)
Create an UnparsedTextResource
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Get the media type (MIME type) of the resource if known
|
String |
getEncoding() |
InputStream |
getInputStream() |
Item |
getItem(XPathContext context)
Get an XDM Item holding the contents of this resource.
|
String |
getResourceURI()
Get a URI that identifies this resource
|
public static final ResourceFactory FACTORY
public UnparsedTextResource(String href, AbstractResourceCollection.InputDetails details)
href - the URI of the resourcedetails - the input stream giving access to the content of the resource, plus encoding infopublic String getResourceURI()
ResourcegetResourceURI in interface Resourcepublic InputStream getInputStream()
public String getEncoding()
public Item getItem(XPathContext context) throws XPathException
ResourcegetItem in interface Resourcecontext - the XPath evaluation contextXPathException - if a failure occurs materializing the resourcepublic String getContentType()
getContentType in interface Resource