aboutsummaryrefslogtreecommitdiff
path: root/other/java/examples
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2021-05-08 13:46:12 +0800
committerGitHub <noreply@github.com>2021-05-08 13:46:12 +0800
commitaabea37af1835af7ec53fb9b6a56295f2a591785 (patch)
treedb57540c45309f15d0efdaed274f84ece94f5a05 /other/java/examples
parent6b8892c5acc8c44c3183e0a4e1b9b673a58c9729 (diff)
parent8f8738867f10c98d59b11eaf165e1c6028d7b1d0 (diff)
downloadseaweedfs-aabea37af1835af7ec53fb9b6a56295f2a591785.tar.xz
seaweedfs-aabea37af1835af7ec53fb9b6a56295f2a591785.zip
Merge pull request #76 from chrislusf/master
sync
Diffstat (limited to 'other/java/examples')
-rw-r--r--other/java/examples/src/main/java/com/seaweedfs/examples/ExampleWriteFile2.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/other/java/examples/src/main/java/com/seaweedfs/examples/ExampleWriteFile2.java b/other/java/examples/src/main/java/com/seaweedfs/examples/ExampleWriteFile2.java
new file mode 100644
index 000000000..61d8c290f
--- /dev/null
+++ b/other/java/examples/src/main/java/com/seaweedfs/examples/ExampleWriteFile2.java
@@ -0,0 +1,22 @@
+package com.seaweedfs.examples;
+
+import com.google.common.io.Files;
+import seaweedfs.client.FilerClient;
+import seaweedfs.client.SeaweedOutputStream;
+
+import java.io.File;
+import java.io.IOException;
+
+public class ExampleWriteFile2 {
+
+ public static void main(String[] args) throws IOException {
+
+ FilerClient filerClient = new FilerClient("localhost", 18888);
+
+ SeaweedOutputStream seaweedOutputStream = new SeaweedOutputStream(filerClient, "/test/1");
+ Files.copy(new File("/etc/resolv.conf"), seaweedOutputStream);
+ seaweedOutputStream.close();
+
+ }
+
+}