Package net.sf.saxon.resource
Class AbstractResourceCollection.InputDetails
- java.lang.Object
-
- net.sf.saxon.resource.AbstractResourceCollection.InputDetails
-
- Enclosing class:
- AbstractResourceCollection
public static class AbstractResourceCollection.InputDetails extends java.lang.ObjectInformation about a resource
-
-
Field Summary
Fields Modifier and Type Field Description byte[]binaryContentThe binary content of the resourcejava.lang.StringcharacterContentThe character content of the resourcejava.lang.StringcontentTypeThe media type of the resourcejava.lang.StringencodingThe encoding of the resource (if it is text, represented in binary)intonErrorAction to be taken in the event of an error, for exampleURIQueryParameters#ON_ERROR_FAIL,URIQueryParameters#ON_ERROR_WARNING, orURIQueryParameters#ON_ERROR_IGNOREParseOptionsparseOptionsOptions for parsing the content of an XML resourcejava.lang.StringresourceUriThe URI of the resource
-
Constructor Summary
Constructors Constructor Description InputDetails()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()Get an input stream that delivers the binary content of the resourcebyte[]obtainBinaryContent()Get the binary content of the resource, either as stored, or by encoding the character content, or by reading the input streamjava.lang.StringobtainCharacterContent()Get the character content of the resource, either as stored, or by reading and decoding the input stream
-
-
-
Field Detail
-
resourceUri
public java.lang.String resourceUri
The URI of the resource
-
binaryContent
public byte[] binaryContent
The binary content of the resource
-
characterContent
public java.lang.String characterContent
The character content of the resource
-
contentType
public java.lang.String contentType
The media type of the resource
-
encoding
public java.lang.String encoding
The encoding of the resource (if it is text, represented in binary)
-
parseOptions
public ParseOptions parseOptions
Options for parsing the content of an XML resource
-
onError
public int onError
Action to be taken in the event of an error, for exampleURIQueryParameters#ON_ERROR_FAIL,URIQueryParameters#ON_ERROR_WARNING, orURIQueryParameters#ON_ERROR_IGNORE
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionGet an input stream that delivers the binary content of the resource- Returns:
- the content, as an input stream
- Throws:
java.io.IOException- if the input cannot be read
-
obtainBinaryContent
public byte[] obtainBinaryContent() throws XPathExceptionGet 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
public java.lang.String obtainCharacterContent() throws XPathExceptionGet 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
-
-