Package io.nitric.api.storage
Class Storage
- java.lang.Object
-
- io.nitric.api.storage.Storage
-
public class Storage extends Object
Provides a Storage API client.
The example below illustrates the Storage API.
import io.nitric.api.storage.Storage; ... byte[] frontData = ... // Store an file file Storage.bucket("inspection-images") .file("582764-front-elevation.jpg") .write(frontData); // Retrieve an image file byte[] sideData = Storage.bucket("inspection-images") .file("582764-side-elevation.jpg") .read(); // Delete an image file Storage.bucket(bucket) .file("582764-rear-elevation.jpg") .delete();
- See Also:
Bucket
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Bucket
bucket(String name)
Create a new storage bucket with the given name.
-