2.9.3 (latest) 2.9.2 2.8.1 2.7.2 2.6.0 2.5.1 2.4.1 2.1.2 2.0.1 1.35.2 1.34.1 1.33.4 Media for Google API's.

## Classes

### [MediaHttpDownloader](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpDownloader.md.txt)

Media HTTP Downloader, with support for both direct and resumable media downloads. Documentation
is available [here](https://developers.google.com/api-client-library/java/google-api-java-client/media-download).

Implementation is not thread-safe.

Back-off is disabled by default. To enable it for an abnormal HTTP response and an I/O
exception you should call HttpRequest#setUnsuccessfulResponseHandler with a new HttpBackOffUnsuccessfulResponseHandler instance and HttpRequest#setIOExceptionHandler
with HttpBackOffIOExceptionHandler.

Upgrade warning: in prior version 1.14 exponential back-off was enabled by default for an
abnormal HTTP response. Starting with version 1.15 it's disabled by default.

### [MediaHttpUploader](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploader.md.txt)

Media HTTP Uploader, with support for both direct and resumable media uploads. Documentation is
available [here](https://googleapis.github.io/google-api-java-client/media-upload.html).

For resumable uploads, when the media content length is known, if the provided InputStream has InputStream#markSupported as `false` then it is wrapped in an
BufferedInputStream to support the InputStream#mark and InputStream#reset
methods required for handling server errors. If the media content length is unknown then each
chunk is stored temporarily in memory. This is required to determine when the last chunk is
reached.

See [#setDisableGZipContent(boolean)](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploader.md.txt#com_google_api_client_googleapis_media_MediaHttpUploader_setDisableGZipContent_boolean_) for information on when content is gzipped and how
to control that behavior.

Back-off is disabled by default. To enable it for an abnormal HTTP response and an I/O
exception you should call HttpRequest#setUnsuccessfulResponseHandler with a new HttpBackOffUnsuccessfulResponseHandler instance and HttpRequest#setIOExceptionHandler
with HttpBackOffIOExceptionHandler.

Upgrade warning: in prior version 1.14 exponential back-off was enabled by default for an
abnormal HTTP response and there was a regular retry (without back-off) when I/O exception was
thrown. Starting with version 1.15 back-off is disabled and there is no retry on I/O exception by
default.

Upgrade warning: in prior version 1.16 #serverErrorCallback was public but starting
with version 1.17 it has been removed from the public API, and changed to be package private.

Implementation is not thread-safe.

## Interfaces

### [MediaHttpDownloaderProgressListener](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpDownloaderProgressListener.md.txt)

An interface for receiving progress notifications for downloads.

Sample usage:

```java

 public static class MyDownloadProgressListener implements MediaHttpDownloaderProgressListener {

   public void progressChanged(MediaHttpDownloader downloader) throws IOException {
     switch (downloader.getDownloadState()) {
       case MEDIA_IN_PROGRESS:
         System.out.println("Download in progress");
         System.out.println("Download percentage: " + downloader.getProgress());
         break;
       case MEDIA_COMPLETE:
         System.out.println("Download Completed!");
         break;
     }
   }
 }
 
```

### [MediaHttpUploaderProgressListener](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploaderProgressListener.md.txt)

An interface for receiving progress notifications for uploads.

Sample usage (if media content length is provided, else consider using [MediaHttpUploader#getNumBytesUploaded](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploader.md.txt#com_google_api_client_googleapis_media_MediaHttpUploader_getNumBytesUploaded_) instead of [MediaHttpUploader#getProgress](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploader.md.txt#com_google_api_client_googleapis_media_MediaHttpUploader_getProgress_):

```java

 public static class MyUploadProgressListener implements MediaHttpUploaderProgressListener {

   public void progressChanged(MediaHttpUploader uploader) throws IOException {
     switch (uploader.getUploadState()) {
       case INITIATION_STARTED:
         System.out.println("Initiation Started");
         break;
       case INITIATION_COMPLETE:
         System.out.println("Initiation Completed");
         break;
       case MEDIA_IN_PROGRESS:
         System.out.println("Upload in progress");
         System.out.println("Upload percentage: " + uploader.getProgress());
         break;
       case MEDIA_COMPLETE:
         System.out.println("Upload Completed!");
         break;
      }
   }
 }
 
```

## Enums

### [MediaHttpDownloader.DownloadState](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpDownloader.DownloadState.md.txt)

Download state associated with the Media HTTP downloader.

### [MediaHttpUploader.UploadState](https://docs.cloud.google.com/java/docs/reference/google-api-client/latest/com.google.api.client.googleapis.media.MediaHttpUploader.UploadState.md.txt)

Upload state associated with the Media HTTP uploader.