I am using Java API (https://docs.min.io/docs/java-client-api-reference.html) to use Minio Client.
I want to create a new folder and a new file (empty or sample text) in existing bucket. How do I do it? Please note that I do not want to upload any existing file from local.
I am aware of below command:
minioClient.putObject(bucketName,objectName, "/path/to/file/object.txt");
But unlike above, I do not have "/path/to/file/object.txt" i.e. I want to create the new file directly in minio.
I saw some example in Python SDK:
client.put_object(
"my-bucket", "my-object", io.BytesIO(b"hello"), 5,
)
I would be fine with above but I need it in Java API? What does putObject (in Java) expects for above example?