Class PrintDocumentStreamRequest

java.lang.Object
com.microsoft.graph.http.BaseStreamRequest<PrintDocument>
com.microsoft.graph.requests.PrintDocumentStreamRequest
All Implemented Interfaces:
com.microsoft.graph.http.IHttpRequest, com.microsoft.graph.http.IHttpStreamRequest

public class PrintDocumentStreamRequest extends com.microsoft.graph.http.BaseStreamRequest<PrintDocument>
The class for the Print Document Stream Request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrintDocumentStreamRequest(String requestUrl, com.microsoft.graph.core.IBaseClient<?> client, List<? extends com.microsoft.graph.options.Option> requestOptions)
    The request for the PrintDocument
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Gets the contents of this stream
    Gets the contents of this stream
    put(byte[] fileContents)
    Uploads to the stream
    putAsync(byte[] fileContents)
    Uploads to the stream

    Methods inherited from class com.microsoft.graph.http.BaseStreamRequest

    addHeader, getDelay, getHeaders, getHttpMethod, getHttpRequest, getMaxRedirects, getMaxRetries, getOptions, getRequestUrl, getShouldRedirect, getShouldRetry, getUseCaches, send, send, sendAsync, sendAsync, setDelay, setMaxRedirects, setMaxRetries, setShouldRedirect, setShouldRetry, setUseCaches, withHttpMethod

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.microsoft.graph.http.IHttpRequest

    getHttpRequest
  • Constructor Details

    • PrintDocumentStreamRequest

      public PrintDocumentStreamRequest(@Nonnull String requestUrl, @Nonnull com.microsoft.graph.core.IBaseClient<?> client, @Nullable List<? extends com.microsoft.graph.options.Option> requestOptions)
      The request for the PrintDocument
      Parameters:
      requestUrl - the request URL
      client - the service client
      requestOptions - the options for this request
  • Method Details

    • getAsync

      @Nonnull public CompletableFuture<InputStream> getAsync()
      Gets the contents of this stream
      Returns:
      a future with the result
    • get

      @Nullable public InputStream get() throws com.microsoft.graph.core.ClientException
      Gets the contents of this stream
      Returns:
      the stream that the caller needs to close
      Throws:
      com.microsoft.graph.core.ClientException - an exception occurs if there was an error while the request was sent
    • putAsync

      @Nonnull public CompletableFuture<PrintDocument> putAsync(@Nonnull byte[] fileContents)
      Uploads to the stream
      Parameters:
      fileContents - the contents of the stream to upload
      Returns:
      a future with the result
    • put

      @Nullable public PrintDocument put(@Nonnull byte[] fileContents) throws com.microsoft.graph.core.ClientException
      Uploads to the stream
      Parameters:
      fileContents - the contents of the stream to upload
      Returns:
      the result of the upload
      Throws:
      com.microsoft.graph.core.ClientException - an exception occurs if there was an error while the request was sent