Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

byte array to inputstream  RSS feed

 
Mike Kao
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there any way that I can convert a byte array(byte[]) to java.io.InputStream?
Many thanks.
Mike
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try ByteArrayInputStream? Looks made for your problem. BTW: My approach to find this was to look at InputStream and see all the known subclasses.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!