Skip to main content
The official Java SDK provides a type-safe way to interact with Bunny Storage in your Java applications. Requires Java 8+.

Installation

Clone the GitHub repository and build from source. The SDK uses Jackson for JSON parsing. Add Jackson Core/Databind/Annotations as dependencies to your project.

Quickstart

Connect to your storage zone

Available regions:

List files

Returns an array of BCDNObject objects. BCDNObject properties:
  • getGUID() - Unique identifier
  • getObjectName() - File name
  • getPath() - Directory path
  • getLength() - File size in bytes
  • getChecksum() - File checksum
  • getDateCreated() - Creation date
  • getLastChanged() - Last modification date
  • getIsDirectory() - Whether it’s a directory
  • getServerID() - Storage server ID
  • getUserID() - BunnyCDN user ID
  • getStorageZoneName() - Storage zone name
  • getStorageZoneID() - Storage zone ID
  • getReplicatedZones() - Replication regions

Upload a file

Upload a folder

Empty directories will not be uploaded.

Download a file

Delete files

Delete operations are irreversible and will succeed regardless of whether the file exists.

Examples

Basic usage

Upload and download

Batch upload folder

List and delete files

Spring Boot integration

Resources