[#1] Define SDK main functional #1

Merged
orikik merged 7 commits from orikik/frostfs-sdk-java:master into master 2024-09-04 19:51:24 +00:00
Showing only changes of commit 7518893388 - Show all commits

View file

@ -18,7 +18,7 @@ neo-go wallet export -w <path_to_your_wallet> -d <address_from_p1>
## Example usage ## Example usage
### Container ### Container operations
orikik marked this conversation as resolved Outdated
Outdated
Review

Container operations maybe?

Container operations maybe?

agree, corrected

agree, corrected
```java ```java
import info.frostfs.sdk.dto.container.Container; import info.frostfs.sdk.dto.container.Container;
@ -50,7 +50,7 @@ public class ContainerExample {
} }
``` ```
### Object ### Object operations
orikik marked this conversation as resolved Outdated
Outdated
Review

Object operations maybe?

Object operations maybe?

agree, corrected

agree, corrected
```java ```java
import info.frostfs.sdk.enums.ObjectType; import info.frostfs.sdk.enums.ObjectType;
@ -58,6 +58,7 @@ import info.frostfs.sdk.dto.container.ContainerId;
import info.frostfs.sdk.dto.object.ObjectAttribute; import info.frostfs.sdk.dto.object.ObjectAttribute;
import info.frostfs.sdk.dto.object.ObjectFilter; import info.frostfs.sdk.dto.object.ObjectFilter;
import info.frostfs.sdk.dto.object.ObjectHeader; import info.frostfs.sdk.dto.object.ObjectHeader;
import info.frostfs.sdk.dto.object.ObjectId;
import info.frostfs.sdk.jdo.PutObjectParameters; import info.frostfs.sdk.jdo.PutObjectParameters;
import info.frostfs.sdk.FrostFSClient; import info.frostfs.sdk.FrostFSClient;
@ -71,7 +72,7 @@ public class ObjectExample {
FrostFSClient frostFSClient = new FrostFSClient(clientSettings); FrostFSClient frostFSClient = new FrostFSClient(clientSettings);
// Put object // Put object
info.frostfs.sdk.dto.object.ObjectId objectId; ObjectId objectId;
try (FileInputStream fis = new FileInputStream("cat.jpg")) { try (FileInputStream fis = new FileInputStream("cat.jpg")) {
var cat = new ObjectHeader( var cat = new ObjectHeader(
containerId, ObjectType.REGULAR, new ObjectAttribute[]{new ObjectAttribute("Filename", "cat.jpg")} containerId, ObjectType.REGULAR, new ObjectAttribute[]{new ObjectAttribute("Filename", "cat.jpg")}