Skip to content

Commit 011730a

Browse files
committed
---
yaml --- r: 875 b: refs/heads/master c: 8591284 h: refs/heads/master i: 873: 38e17e6 871: 89e6d21 v: v3
1 parent 267d3eb commit 011730a

3 files changed

Lines changed: 10 additions & 24 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: c1f018c35c46b9d9e2416fc0a8c542d972d78518
2+
refs/heads/master: 8591284926cec97e1d58b2d6e24b07d098fda171
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@ public Blob(Storage storage, BlobInfo info) {
109109
*/
110110
public Blob(Storage storage, String bucket, String blob) {
111111
this.storage = checkNotNull(storage);
112-
this.info = BlobInfo.of(bucket, blob);
112+
this.info = BlobInfo.of(checkNotNull(bucket), checkNotNull(blob));
113113
}
114114

115115
/**
116-
* Get the blobs's information.
117-
*
118-
* @return a {@code BlobInfo} object for this blob
116+
* Return the blob's information.
119117
*/
120118
public BlobInfo info() {
121119
return info;
@@ -135,7 +133,6 @@ public boolean exists() {
135133
* Return this blob's content.
136134
*
137135
* @param options blob read options
138-
* @return the blob's content
139136
* @throws StorageException upon failure
140137
*/
141138
public byte[] content(Storage.BlobSourceOption... options) {
@@ -199,21 +196,19 @@ public Blob copyTo(BlobInfo target, Iterable<BlobSourceOption> sourceOptions,
199196
}
200197

201198
/**
202-
* Return a channel for reading this blob's content.
199+
* Return a {@code BlobReadChannel} object for reading this blob's content.
203200
*
204201
* @param options blob read options
205-
* @return a {@code BlobReadChannel} object to read this blob
206202
* @throws StorageException upon failure
207203
*/
208204
public BlobReadChannel reader(BlobSourceOption... options) {
209205
return storage.reader(info.bucket(), info.name(), convert(info, options));
210206
}
211207

212208
/**
213-
* Return a channel for writing to this blob.
209+
* Return a {@code BlobWriteChannel} object for writing to this blob.
214210
*
215211
* @param options target blob options
216-
* @return a {@code BlobWriteChannel} object for writing to this blob
217212
* @throws StorageException upon failure
218213
*/
219214
public BlobWriteChannel writer(BlobTargetOption... options) {
@@ -236,9 +231,7 @@ public URL signUrl(long expirationTimeInSeconds, SignUrlOption... options) {
236231
}
237232

238233
/**
239-
* Get this blobs's {@code Storage} object.
240-
*
241-
* @return the storage service used by this blob to issue requests
234+
* Return the blob's {@code Storage} object used to issue requests.
242235
*/
243236
public Storage storage() {
244237
return storage;

trunk/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ public Bucket(Storage storage, BucketInfo info) {
5757
*/
5858
public Bucket(Storage storage, String bucket) {
5959
this.storage = checkNotNull(storage);
60-
this.info = BucketInfo.of(bucket);
60+
this.info = BucketInfo.of(checkNotNull(bucket));
6161
}
6262

6363
/**
64-
* Get the bucket's information.
65-
*
66-
* @return a {@code BucketInfo} object for this bucket
64+
* Return the bucket's information.
6765
*/
6866
public BucketInfo info() {
6967
return info;
@@ -103,10 +101,9 @@ public boolean delete(BucketSourceOption... options) {
103101
}
104102

105103
/**
106-
* List blobs in this bucket.
104+
* Return the paginated list of {@code Blob} in this bucket.
107105
*
108106
* @param options options for listing blobs
109-
* @return the paginated list of {@code Blob} objects in this bucket
110107
* @throws StorageException upon failure
111108
*/
112109
public ListResult<Blob> list(Storage.BlobListOption... options) {
@@ -118,7 +115,6 @@ public ListResult<Blob> list(Storage.BlobListOption... options) {
118115
*
119116
* @param blob name of the requested blob
120117
* @param options blob search options
121-
* @return the requested blob in this bucket or {@code null} if not found
122118
* @throws StorageException upon failure
123119
*/
124120
public Blob get(String blob, BlobSourceOption... options) {
@@ -129,7 +125,6 @@ public Blob get(String blob, BlobSourceOption... options) {
129125
* Return a list of requested blobs in this bucket. Blobs that do not exist are null.
130126
*
131127
* @param blobNames names of the requested blobs
132-
* @return a list containing the requested blobs in this bucket
133128
* @throws StorageException upon failure
134129
*/
135130
public List<Blob> getAll(String... blobNames) {
@@ -161,9 +156,7 @@ Blob create(String blob, byte[] content, BlobTargetOption... options) {
161156
}
162157

163158
/**
164-
* Get this bucket's {@code Storage} object.
165-
*
166-
* @return the storage service used by this bucket to issue requests
159+
* Return the bucket's {@code Storage} object used to issue requests.
167160
*/
168161
public Storage storage() {
169162
return storage;

0 commit comments

Comments
 (0)