1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-17 17:02:31 +02:00

another simple example

This commit is contained in:
Chris Lu 2021-05-06 11:25:36 -07:00
parent 48601bce6c
commit 28d58bac62

View file

@ -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();
}
}