0

I have an API which returns me the content in form of ByteArrayInputStream basically which is a video content. Now for streaming it looks MappedByteBuffer seems best fit. So how to convert this ByteArrayInputStream to an instance of MappedByteBuffer?

suchit
  • 57
  • 9
  • 1
    `MappedByteBuffer` is used to map a file region into memory. `ByteArrayInputStream` already keeps a buffer in memory. Why would you want to transform one into another? Also consider this https://stackoverflow.com/questions/30026060/java-inputstream-to-bytebuffer. – yegodm Oct 24 '18 at 15:26
  • Well sometimes the Bytearrayinputstream is a very big value. And I am getting an out of memory exception. @yegodm – suchit Oct 24 '18 at 17:56

0 Answers0