Class AbstractResourceCollection.InputDetails

    • Field Detail

      • resourceUri

        public String resourceUri
        The URI of the resource
      • binaryContent

        public byte[] binaryContent
        The binary content of the resource
      • characterContent

        public String characterContent
        The character content of the resource
      • contentType

        public String contentType
        The media type of the resource
      • encoding

        public 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 example URIQueryParameters#ON_ERROR_FAIL, URIQueryParameters#ON_ERROR_WARNING, or URIQueryParameters#ON_ERROR_IGNORE
    • Constructor Detail

      • InputDetails

        public InputDetails()
    • Method Detail

      • getInputStream

        public InputStream getInputStream​(Configuration config)
                                   throws IOException
        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

        public byte[] obtainBinaryContent​(Configuration config)
                                   throws XPathException
        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

        public String obtainCharacterContent​(Configuration config)
                                      throws XPathException
        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, or null if the resource cannot be read and errors are suppressed.
        Throws:
        XPathException - in the event of a failure, if the default setting on-error=fail is used; otherwise, return null in the event of a failure.