JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
com.amazonaws.services.workdocs

Class ContentManager

  • Direct Known Subclasses:
    ContentManagerAsync


    @ThreadSafe
    public class ContentManager
    extends Object 
    High level synchronous utility for transferring content from and to Amazon WorkDocs. ContentManager provides a simple API for uploading and downloading documents to/from Amazon WorkDocs easily. ContentManager, like all the client classes in the AWS SDK for Java, is thread safe.

    In order to use ContentManager:

     AWSStaticCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(new AnonymousAWSCredentials());
     AmazonWorkDocs client = AmazonWorkDocsClient.builder().withCredentials(credentialsProvider).withRegion(Regions.REGION).build();
     ContentManager contentManager = ContentManagerBuilder.standard().withWorkDocsClient(client).withAuthenticationToken(authenticationToken).build();
     GetDocumentStreamRequest request = new GetDocumentStreamRequest();
     request.setDocumentId("doc-id");
     InputStream inputStream = contentManager.getDocumentStream(request).getStream();
     
    • Method Detail

      • getDocumentStream

        public GetDocumentStreamResult getDocumentStream(GetDocumentStreamRequest getDocumentStreamRequest)
        Gets document stream from WorkDocs. If VersionId of GetDocumentStreamRequest is not specified, then the latest version of specified document is retrieved. Clients must close the stream once content is read.
        Parameters:
        getDocumentStreamRequest - Request specifying parameters of the operation.
        Returns:
        Result containing stream of requested document content.
      • uploadDocumentStream

        public UploadDocumentStreamResult uploadDocumentStream(UploadDocumentStreamRequest uploadDocumentStreamRequest)
        Uploads document stream to WorkDocs. If document ID is specified, then it creates a new version under this document. If document ID is not specified, then it creates a new document and uploads content to its only version.\ Client must close the input stream once upload operation is complete.
        Parameters:
        uploadDocumentStreamRequest - Request specifying parameters of the operation.
        Returns:
        Result containing metadata of the newly created document or version.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

AltStyle によって変換されたページ (->オリジナル) /