Package com.documentum.fc.client.search

# Interface IDfResultContent

public interface IDfResultContent
Represents the actual content corresponding to a result.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDOSExtension()`
  Gets the default DOS extension corresponding to the content type.
  `InputStream`
  `getInputStream()`
  Gets an InputStream to the content.
  `String`
  `getMIMEType()`
  Gets the MIME type of the content.
  `int`
  `getSize()`
  Gets the size of the content.
  `String`
  `getType()`
  Gets the content type of the content.
  `void`
  `release()`
  Releases resources used by this instance.

- ## Method Details

  - ### getType

    String getType() throws DfException
    Gets the content type of the content.
    Returns:
      A Documentum representation of the content type.
    Throws:
      `DfException` - DfResultContentException, if an error occurred while trying to communicate with the source (example: timeout, source unreachable); DfSearchLoginException, if credentials were needed and not provided through IDfSessionManager or if the credentials are incorrect; DfException, if a configuration or an internal error occurred.

  - ### getMIMEType

    String getMIMEType() throws DfException
    Gets the MIME type of the content. This is equivalent to method getType() above except that the MIME type is returned instead of the Documentum representation of the type.

    Note that the MIME type, may have additional information like the charset for text, the syntax is: type/subtype [; additionalInfo]

    Example: "text/html ;charset=UTF-8"
    Returns:
      The MIME Type.
    Throws:
      `DfException` - DfResultContentException, if an error occurred while trying to communicate with the source (example: timeout, source unreachable); DfSearchLoginException, if credentials were needed and not provided through IDfSessionManager or if the credentials are incorrect; DfException, if a configuration or an internal error occurred.

  - ### getSize

    int getSize() throws DfException
    Gets the size of the content.
    Returns:
      The size in bytes.
    Throws:
      `DfException` - DfResultContentException, if an error occurred while trying to communicate with the source (example: timeout, source unreachable); DfSearchLoginException, if credentials were needed and not provided through IDfSessionManager or if the credentials are incorrect; DfException, if a configuration or an internal error occurred.

  - ### getDOSExtension

    String getDOSExtension() throws DfException
    Gets the default DOS extension corresponding to the content type.
    Returns:
      The DOS extension associated to the content type or null if no extension is associated to the content type.
    Throws:
      `DfException` - DfResultContentException, if an error occurred while trying to communicate with the source (example: timeout, source unreachable); DfSearchLoginException, if credentials were needed and not provided through IDfSessionManager or if the credentials are incorrect; DfException, if a configuration or an internal error occurred.

  - ### getInputStream

    InputStream getInputStream() throws DfException
    Gets an InputStream to the content. Note that obtaining a reference to this IDfResultContent instance already initiated the download of the content. Some or all of it may already be present in the DFC layer.
    Returns:
      An input stream to the content.
    Throws:
      `DfException` - DfResultContentException, if an error occurred while trying to communicate with the source (example: timeout, source unreachable); DfSearchLoginException, if credentials were needed and not provided through IDfSessionManager or if the credentials are incorrect; DfException, if a configuration or an internal error occurred.

  - ### release

    void release()
    Releases resources used by this instance. If this method is not called, subsequent call to the search services may fail. Once this method has been called, there should be no usage of any method of this instance or of the input stream to the content.