summaryrefslogtreecommitdiffstats
path: root/java/examples/CreateDisk.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/examples/CreateDisk.java')
-rw-r--r--java/examples/CreateDisk.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/java/examples/CreateDisk.java b/java/examples/CreateDisk.java
index 41f8739b..381fae1f 100644
--- a/java/examples/CreateDisk.java
+++ b/java/examples/CreateDisk.java
@@ -66,6 +66,11 @@ public class CreateDisk
// the disk image.
g.upload ("/etc/resolv.conf", "/foo/resolv.conf");
+ // Because we wrote to the disk and we want to detect write
+ // errors, call g.shutdown. You don't need to do this:
+ // g.close will do it implicitly.
+ g.shutdown ();
+
// Note also that handles are automatically closed if they are
// reaped by the garbage collector. You only need to call close
// if you want to close the handle right away.