Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


oracle.ifs.fdk
Interface FileContentManager


public interface FileContentManager

Interface for managing and accessing file content.

(Unpublished)

Method Summary
 void createDocument(long folderId, java.lang.String name, java.io.InputStream content, NamedValue[] attributes)
          Creates a new DOCUMENT in the given Folder.
 java.io.InputStream getContent(long docId)
          Returns the content of a DOCUMENT.
 int read(long docId, long offset, byte[] buffer, int length)
          Reads bytes from the content of a DOCUMENT into an array.
 void updateContent(long id, java.io.InputStream content, NamedValue[] attributes)
          Updates an existing Item's content.

 

Method Detail

createDocument

public void createDocument(long folderId,
                           java.lang.String name,
                           java.io.InputStream content,
                           NamedValue[] attributes)
                    throws FdkException
Creates a new DOCUMENT in the given Folder.

Note that if a DOCUMENT with the same name already exists in the FOLDER, a new version may be created depending on the versioning configuration of the FOLDER.

Parameters:
folderId - the ID of the folder in which to create the DOCUMENT.
name - the name of the new DOCUMENT.
content - the InputStream with the new DOCUMENT's content.
attributes - additional attributes to be set for the new DOCUMENT, 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
Returns the content of a DOCUMENT.
Parameters:
docId - the ID of the DOCUMENT.
Returns:
the DOCUMENT's content as an InputStream.
Throws:
FdkException - if the operation fails.

read

public int read(long docId,
                long offset,
                byte[] buffer,
                int length)
         throws FdkException
Reads bytes from the content of a DOCUMENT into an array.
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.

updateContent

public void updateContent(long id,
                          java.io.InputStream content,
                          NamedValue[] attributes)
                   throws FdkException
Updates an existing Item's content.

Supported Items: DOCUMENT, DOCUMENT_DEFINITION

Parameters:
id - the ID of the Item 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.

Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


Copyright © 2002, 2005, Oracle. All rights reserved.