From 0c1a6333b24d0253d3b3d30c796e57da992f7dbc Mon Sep 17 00:00:00 2001 From: DrMarshall Date: Fri, 5 Aug 2016 15:12:21 -0700 Subject: [PATCH] update storage use example in README to create BlobInfo with builder instead of passing a String blobname, which is not supported --- gcloud-java-storage/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcloud-java-storage/README.md b/gcloud-java-storage/README.md index d758256c18bd..fa16953f7175 100644 --- a/gcloud-java-storage/README.md +++ b/gcloud-java-storage/README.md @@ -101,9 +101,9 @@ String bucketName = "my_unique_bucket"; // Change this to something unique Bucket bucket = storage.create(BucketInfo.of(bucketName)); // Upload a blob to the newly created bucket -BlobId blobId = BlobId.of(bucketName, "my_blob_name"); -Blob blob = storage.create( - "my_blob_name", "a simple blob".getBytes(UTF_8), "text/plain"); +BlobId blobId = BlobId.of("bucket", "blob_name"); +BlobInfo blobInfo = BlobInfo.builder(blobId).contentType("text/plain").build(); +Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8)); ``` At this point, you will be able to see your newly created bucket and blob on the Google Developers Console.