This post is more than 5 years old
7 Posts
1
12350
October 26th, 2015 15:00
AtmosApi.readObjectStream returns empty stream.
Hello,
Please do let me know if this is not the right forum to ask this question.
That being said, I'm having an issue with using the Java Atmos Client API (ver 2.1.5). I want to to stream the content to the Servlet response instead of first reading the byte array because that loads all the content of the file to memory.
Here is the code so far:
ReadObjectResponse response = this.esuAPI.readObjectStream(new ObjectId(atmosObjectId), null);
after this executes the response.getContentLength() method prints 0.
I have verified following details before posting:
1. Connection credentials are correct (host, port, uid and secret key)
2. File does have proper data on the server. I'm able to download the file via AtmosChrome extension.
I'm not sure why the response would be empty?