Class SimpleBinaryResource

    • Constructor Detail

      • SimpleBinaryResource

        public SimpleBinaryResource​(Collection parent,
                                    java.lang.String id)
        Create a new BinaryResource without any content.
      • SimpleBinaryResource

        public SimpleBinaryResource​(Collection parent,
                                    java.lang.String id,
                                    byte[] content)
        Create a fully initialized BinaryResource
    • Method Detail

      • getResourceType

        public java.lang.String getResourceType()
                                         throws XMLDBException
        Returns the resource type for this Resource.
        Specified by:
        getResourceType in interface Resource
        Returns:
        the resource type for the Resource.
        Throws:
        XMLDBException - with expected error codes.
        ErrorCodes.VENDOR_ERROR for any vendor specific errors that occur.
      • getContent

        public java.lang.Object getContent()
                                    throws XMLDBException
        Retrieves the content from the resource. The type of the content varies depending what type of resource is being used.
        Specified by:
        getContent in interface Resource
        Returns:
        the content of the resource.
        Throws:
        XMLDBException - with expected error codes.
        ErrorCodes.VENDOR_ERROR for any vendor specific errors that occur.
      • setContent

        public void setContent​(java.lang.Object value)
                        throws XMLDBException
        Sets the content for this resource. The type of content that can be set depends on the type of resource being used.
        Specified by:
        setContent in interface Resource
        Parameters:
        value - the content value to set for the resource.
        Throws:
        XMLDBException - with expected error codes.
        ErrorCodes.VENDOR_ERROR for any vendor specific errors that occur.