You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
sanjeev_hansanur1
3 years agoExplorer | Level 4
how to do I get content of a file in Dropboxsdk using java code
how do I get content of a file using dropboxsdk code and we tried with download sdk method but Inputstream is not converting in to proper string
Please help us with some sample code for download where we can convert the inputstream to string
- Greg-DBDropbox Staff
You can retrieve file content using the Dropbox Java SDK via the download methods. You can find the documentation for the download methods here. There are also some examples of downloading files using that SDK here and here.
It sounds like you already have an InputStream and need to get a String from it. That's more of a general Java question and so outside the scope of Dropbox API support, but you can find information on doing so in this post, for example.
- ЗдравкоLegendary | Level 20
sanjeev_hansanur1 wrote:... convert the inputstream to string
A good way to convert raw input stream to whatever you want (including string) is wrapping it using DataInputStream class. The benefit here is that you don't need buffering, so the need of engaging memory decreases. Processing happens "on flight" (or could be at least, if you code properly - process resulting string, or whatever else, piece by piece - following the streaming conception). 😉
Hope this helps.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!