I am using below endpoint to get the content of file in sharepoint:
https://<site>/_api/web/GetFolderByServerRelativeUrl('folder name')/Files('file name')/$value?binaryStringResponseBody=true
But this is returning a response in octet stream and the content type of response is application/octet-stream. Is there a way to get the content in human readable format directly? If not , is there a way to convert it into other format in java?