Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk.core
Class CoreFileContentManager

    java.lang.Object
      oracle.ifs.fdk.impl.FileContentManagerImpl
          oracle.ifs.fdk.core.CoreFileContentManager

All Implemented Interfaces:
  ExtendedFileContentManager, FileContentManager

    public class CoreFileContentManager

extends FileContentManagerImpl

The file content management Facade implementation.

Constructor Summary
`CoreFileContentManager(FdkSession session)` Constructor.

Method Summary
`java.io.InputStream` | `getContent(long docId)` Returns the contents of an item identified by the given ID.
`int` | `read(long docId, long offset, byte[] buffer, int length)` Reads a byte range from the content of a document and places it in the provided buffer.
`void` | `updateContent(long id, java.io.InputStream content, NamedValue[] attributes)` Updates the content of an existing DOCUMENT or DOCUMENT_DEFINITION item.

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

Constructor Detail

### CoreFileContentManager

    public CoreFileContentManager(FdkSession session)

  Constructor.

Method Detail

### updateContent

    public void updateContent(long id,
                              java.io.InputStream content,
                              NamedValue[] attributes)
                       throws FdkException

  Description copied from class: `CoreFileContentManager`
  Updates the content of an existing DOCUMENT or DOCUMENT_DEFINITION item.

  Parameters:
    `id` - the ID of the DOCUMENT or DOCUMENT_DEFINITION to update.
    `content` - the InputStream with the updated content.
    `attributes` - additional attributes to update, or null. Valid attributes are:
    - Attributes.DOCUMENT_CHARACTER_SET
    - Attributes.DOCUMENT_LANGUAGE
  Throws:
    `FdkException` - if the operation fails.

### getContent

    public java.io.InputStream getContent(long docId)
                                   throws FdkException

  Description copied from class: `CoreFileContentManager`
  Returns the contents of an item identified by the given ID. In general only documents and links to documents return content, if any. For all items that do not have content `null` will be returned or and exception may be raised, depending on the type of the item.

  The caller must call `close()` on the returned `InputStream` when no longer needed.

  Parameters:
    `docId` - The ID of the item to get the content for.
  Returns:
    The content as an `InputStream` or `null` if the item has no content. The caller must `close()` the stream when no longer needed.
  Throws:
    `FdkException` - if the operation fails.

### read

    public int read(long docId,
                    long offset,
                    byte[] buffer,
                    int length)
             throws FdkException

  Description copied from class: `CoreFileContentManager`
  Reads a byte range from the content of a document and places it in the provided buffer.

  Parameters:
    `docId` - the ID of the DOCUMENT.
    `offset` - the start offset of the data.
    `buffer` - the buffer into which the data is read.
    `length` - the maximum number of bytes read.
  Returns:
    the number of bytes actually read.
  Throws:
    `FdkException` - if the operation fails.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD