Interface IDfSysObjectStream

All Superinterfaces:
IDfPersistentObject, IDfSysObject, IDfTypedObject, com.documentum.fc.client.internal.IPersistentObjectInternal, com.documentum.fc.client.internal.ITypedObjectInternal

public interface IDfSysObjectStream extends com.documentum.fc.client.internal.IPersistentObjectInternal, IDfSysObject
This class provides access to the any new public stream/content related api's for the IDfSysobject class. An obtained IDfSysObject should be cast to IDfSysObjectStream to make these calls.
  • Method Details

    • getStream

      InputStream getStream(String format, int page, String pageModifier, boolean other) throws DfException
      Retrieves a content as InputStream from the Documentum server. The following code example demonstrates how to get the sysobject content as stream from the Documentum server and to print it to standard output console


       InputStream inputStream = ((IDfSysObjectStream) sysobject).getStream("crtext", 0, null, false);
       String line;
       BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( inputStream ) );
       while( (line = bufferedReader.readLine()) != null )
       {
            System.out.printf("%s\n", line);
       }
       

      Parameters:
      format - Specifies the file format of the content.
      page - Identifies the position of the content when the object has multiple contents; otherwise, use 0.
      pageModifier - uniquely identifies a rendition within the same page number and format for a document. If there already exists a rendition with the supplied page_modifier (at the given format and page) the rendition will be overwritten.
      other - for files created on Macintosh systems, indicates whether you want to set the data fork (the file containing the content) or the resource fork.
      Returns:
      the input stream for the specified sysobject content.
      Throws:
      DfException - if a server error occurs.
    • setStream

      void setStream(InputStream stream, int size, String format) throws DfException
      Sets content as input stream to an associated sysobject. This operation is not committed until a save or a checkin is performed.

      The following code example demonstrates how to set content as stream


       ((IDfSysObjectStream)sysobject).setStream(stream0, stream0.available(), "crtext");
       sysObj.save();
       

      Parameters:
      stream - the content as a InputStream.
      size - the content stream size
      format - Specifies the file format of the content.
      Throws:
      DfException - if a server error occurs.
    • setStreamEx

      void setStreamEx(InputStream stream, long size, String format, int page, InputStream otherStream, long otherSize) throws DfException
      This is the extended setStream() method for setting the content as InputStream to an associated sysobject.
      Parameters:
      stream - the content as a InputStream.
      size - the content stream size
      format - Specifies the file format of the content.
      page - Identifies the position of the content when the object has multiple contents; otherwise, use 0.
      otherStream - stream for files created on Macintosh systems.
      otherSize - size of stream for files created on Macintosh systems.
      Throws:
      DfException - if a server error occurs.