Package io.nitric.api.storage
Class Bucket
- java.lang.Object
-
- io.nitric.api.storage.Bucket
-
public class Bucket extends Object
Provides a Storage API bucket class.
The example below illustrates the Storage API.
import io.nitric.api.storage.Storage; ... byte[] imageData = ... // Store a file: 'inspection-images/582764-front-elevation.jpg' Storage.bucket("inspection-images") .file("582764-front-elevation.jpg") .write(imageData); // Load an image file imageData = Storage.bucket("inspection-images") .file("582764-side-elevation.jpg") .read(); // Delete an image file Storage.bucket(bucket) .file("582764-rear-elevation.jpg") .delete();
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
file(String key)
Create a storage file object with the given key.String
getName()
Return the bucket name.String
toString()
Return the string representation of this object.
-