mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated SeaweedFS Java Client (markdown)
parent
6e1e5600c9
commit
52bf97e13a
|
@ -15,16 +15,16 @@ Implemented APIs for file system storage. The blob storage APIs is not included.
|
||||||
## Read File
|
## Read File
|
||||||
|
|
||||||
```
|
```
|
||||||
FilerGrpcClient filerGrpcClient = new FilerGrpcClient("localhost", 18888);
|
FilerClient filerClient = new FilerClient("localhost", 18888);
|
||||||
SeaweedInputStream seaweedInputStream = new SeaweedInputStream(filerGrpcClient, "/test.zip");
|
SeaweedInputStream seaweedInputStream = new SeaweedInputStream(filerClient, "/test.zip");
|
||||||
// next, you can use seaweedInputStream as a normal InputStream
|
// next, you can use seaweedInputStream as a normal InputStream
|
||||||
```
|
```
|
||||||
|
|
||||||
## Write File
|
## Write File
|
||||||
|
|
||||||
```
|
```
|
||||||
FilerGrpcClient filerGrpcClient = new FilerGrpcClient("localhost", 18888);
|
FilerClient filerClient = new FilerClient("localhost", 18888);
|
||||||
SeaweedOutputStream seaweedOutputStream = new SeaweedOutputStream(filerGrpcClient, "/test/"+filename);
|
SeaweedOutputStream seaweedOutputStream = new SeaweedOutputStream(filerClient, "/test/"+filename);
|
||||||
// next, you can use seaweedOutputStream as a normal OutputStream
|
// next, you can use seaweedOutputStream as a normal OutputStream
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue