OSS SDK for Java supports six methods for downloading objects:
Streaming download (OSS SDK for Java 1.0): Read object data as a stream without writing to disk. Use this method when processing large files or performing in-memory data operations.
Download objects as files using OSS SDK for Java 1.0: Save an object to a local file. Use this method when you need a persistent local copy for further processing.
Range download (OSS SDK for Java 1.0): Retrieve a specific byte range of an object instead of the full object. Use this method when you need only a portion of the data.
Resumable download (OSS SDK for Java 1.0): Resume an interrupted download from the last checkpoint. Use this method for large objects or unreliable network connections to avoid restarting the download and reduce bandwidth usage.
Conditional download (OSS SDK for Java 1.0): Download an object only when it meets conditions you specify, such as object size or last-modified time. Use this method when you need a specific version or state of an object.
Download an object using a presigned URL (Java SDK V1): Generate a signed URL to grant time-limited access to an object for users outside your account. Only users with a valid signed URL can access the object.
To track download progress, see Progress bar (OSS SDK for Java 1.0).