Package net.sf.saxon.resource
Class AbstractResourceCollection.InputDetails
java.lang.Object
net.sf.saxon.resource.AbstractResourceCollection.InputDetails
- Enclosing class:
AbstractResourceCollection
Information about a resource
-
Field Summary
FieldsModifier and TypeFieldDescriptionbyte[]
The binary content of the resourceThe character content of the resourceThe media type of the resourceThe encoding of the resource (if it is text, represented in binary)int
Action to be taken in the event of an error, for exampleURIQueryParameters#ON_ERROR_FAIL
,URIQueryParameters#ON_ERROR_WARNING
, orURIQueryParameters#ON_ERROR_IGNORE
Options for parsing the content of an XML resourceThe URI of the resource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet an input stream that delivers the binary content of the resourcebyte[]
Get the binary content of the resource, either as stored, or by encoding the character content, or by reading the input streamGet the character content of the resource, either as stored, or by reading and decoding the input stream
-
Field Details
-
resourceUri
The URI of the resource -
binaryContent
public byte[] binaryContentThe binary content of the resource -
characterContent
The character content of the resource -
contentType
The media type of the resource -
encoding
The encoding of the resource (if it is text, represented in binary) -
parseOptions
Options for parsing the content of an XML resource -
onError
public int onErrorAction to be taken in the event of an error, for exampleURIQueryParameters#ON_ERROR_FAIL
,URIQueryParameters#ON_ERROR_WARNING
, orURIQueryParameters#ON_ERROR_IGNORE
-
-
Constructor Details
-
InputDetails
public InputDetails()
-
-
Method Details
-
getInputStream
Get an input stream that delivers the binary content of the resource- Returns:
- the content, as an input stream
- Throws:
IOException
- if the input cannot be read
-
obtainBinaryContent
Get the binary content of the resource, either as stored, or by encoding the character content, or by reading the input stream- Returns:
- the binary content of the resource
- Throws:
XPathException
- if the binary content cannot be obtained
-
obtainCharacterContent
Get the character content of the resource, either as stored, or by reading and decoding the input stream- Returns:
- the character content of the resource
- Throws:
XPathException
- in the event of a failure
-