Commit 9201de5 1 parent 466d08f commit 9201de5 Copy full SHA for 9201de5
File tree 2 files changed +4
-8
lines changed
google-cloud-storage/src/main/java/com/google/cloud/storage
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -726,11 +726,9 @@ public ReadChannel reader(BlobSourceOption... options) {
726
726
* <pre>{@code
727
727
* byte[] content = "Hello, World!".getBytes(UTF_8);
728
728
* try (WriteChannel writer = blob.writer()) {
729
- * try {
730
729
* writer.write(ByteBuffer.wrap(content, 0, content.length));
731
- * } catch (Exception ex) {
732
- * // handle exception
733
- * }
730
+ * } catch (IOException ex) {
731
+ * // handle exception
734
732
* }
735
733
* }</pre>
736
734
*
Original file line number Diff line number Diff line change @@ -2503,11 +2503,9 @@ Blob create(
2503
2503
* byte[] content = "Hello, World!".getBytes(UTF_8);
2504
2504
* BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentType("text/plain").build();
2505
2505
* try (WriteChannel writer = storage.writer(blobInfo)) {
2506
- * try {
2507
2506
* writer.write(ByteBuffer.wrap(content, 0, content.length));
2508
- * } catch (Exception ex) {
2509
- * // handle exception
2510
- * }
2507
+ * } catch (IOException ex) {
2508
+ * // handle exception
2511
2509
* }
2512
2510
* }</pre>
2513
2511
*
You can’t perform that action at this time.
0 commit comments