## org.exist.xmldb
Class LocalBinaryResource

    java.lang.Object
      org.exist.xmldb.AbstractEXistResource
          org.exist.xmldb.LocalBinaryResource

All Implemented Interfaces:
  BinaryResource, EXistResource, Resource

public class LocalBinaryResource
extends AbstractEXistResource
implements BinaryResource

Author:
  wolf

Field Summary

Fields inherited from interface org.xmldb.api.modules.BinaryResource
`RESOURCE_TYPE`

Constructor Summary
`LocalBinaryResource(User user, BrokerPool pool, LocalCollection collection, XmldbURI docId)`

Method Summary
`java.lang.Object` `getContent()` Retrieves the content from the resource.
`int` `getContentLength()`
`java.util.Date` `getCreationTime()`
`java.lang.String` `getId()` Returns the unique id for this `Resource` or null if the `Resource` is anonymous.
`java.util.Date` `getLastModificationTime()`
`java.lang.String` `getMimeType()`
`Collection` `getParentCollection()` Returns the `Collection` instance that this resource is associated with.
`Permission` `getPermissions()`
`java.lang.String` `getResourceType()` Returns the resource type for this Resource.
`void` `setContent(java.lang.Object value)` Sets the content for this resource.

Methods inherited from class org.exist.xmldb.AbstractEXistResource
`getDocType, setDocType, setLexicalHandler, setMimeType`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalBinaryResource

    public LocalBinaryResource(User user,
                               BrokerPool pool,
                               LocalCollection collection,
                               XmldbURI docId)

Method Detail

### getParentCollection

    public Collection getParentCollection()
                                   throws XMLDBException

  Description copied from interface: `Resource`
  Returns the `Collection` instance that this resource is associated with. All resources must exist within the context of a `collection`.

  Specified by:
    `getParentCollection` in interface `Resource`
  Returns:
    the collection associated with the resource.
  Throws:
    `XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### getId

    public java.lang.String getId()
                           throws XMLDBException

  Description copied from interface: `Resource`
  Returns the unique id for this `Resource` or null if the `Resource` is anonymous. The `Resource` will be anonymous if it is obtained as the result of a query.

  Specified by:
    `getId` in interface `Resource`
  Returns:
    the id for the Resource or null if no id exists.
  Throws:
    `XMLDBException` - with expected error codes.
    `ErrorCodes.VENDOR_ERROR` for any vendor specific errors that occur.

### getResourceType

    public java.lang.String getResourceType()
                                     throws XMLDBException

  Description copied from interface: `Resource`
  Returns the resource type for this Resource.

  XML:DB defined resource types are:

  XMLResource - all XML data stored in the database
  BinaryResource - Binary blob data stored in the database

  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

  Description copied from interface: `Resource`
  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

  Description copied from interface: `Resource`
  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.

### getCreationTime

    public java.util.Date getCreationTime()
                                   throws XMLDBException

  Specified by:
    `getCreationTime` in interface `EXistResource`
  Specified by:
    `getCreationTime` in class `AbstractEXistResource`
  Throws:
    `XMLDBException`

### getLastModificationTime

    public java.util.Date getLastModificationTime()
                                           throws XMLDBException

  Specified by:
    `getLastModificationTime` in interface `EXistResource`
  Specified by:
    `getLastModificationTime` in class `AbstractEXistResource`
  Throws:
    `XMLDBException`

### getMimeType

    public java.lang.String getMimeType()
                                 throws XMLDBException

  Specified by:
    `getMimeType` in interface `EXistResource`
  Overrides:
    `getMimeType` in class `AbstractEXistResource`
  Throws:
    `XMLDBException`

### getPermissions

    public Permission getPermissions()
                              throws XMLDBException

  Specified by:
    `getPermissions` in interface `EXistResource`
  Specified by:
    `getPermissions` in class `AbstractEXistResource`
  Throws:
    `XMLDBException`

### getContentLength

    public int getContentLength()
                         throws XMLDBException

  Specified by:
    `getContentLength` in interface `EXistResource`
  Throws:
    `XMLDBException`

Copyright (C) Wolfgang Meier. All rights reserved.