public class UnparsedTextResource extends java.lang.Object implements Resource
Modifier and Type | Field and Description |
---|---|
static ResourceFactory |
FACTORY |
Constructor and Description |
---|
UnparsedTextResource(java.lang.String href,
AbstractResourceCollection.InputDetails details)
Create an UnparsedTextResource
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Get the media type (MIME type) of the resource if known
|
java.lang.String |
getEncoding() |
java.io.InputStream |
getInputStream() |
Item |
getItem(XPathContext context)
Get an XDM Item holding the contents of this resource.
|
java.lang.String |
getResourceURI()
Get a URI that identifies this resource
|
public static final ResourceFactory FACTORY
public UnparsedTextResource(java.lang.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 java.lang.String getResourceURI()
Resource
getResourceURI
in interface Resource
public java.io.InputStream getInputStream()
public java.lang.String getEncoding()
public Item getItem(XPathContext context) throws XPathException
Resource
getItem
in interface Resource
context
- the XPath evaluation contextXPathException
- if a failure occurs materializing the resourcepublic java.lang.String getContentType()
getContentType
in interface Resource
Copyright (c) 2004-2019 Saxonica Limited. All rights reserved.