The byte array can be converted into the input stream using the java.io.ByteArrayInputStream class. The ByteArrayInputStream class extends the InputStream class.
In the constructor of the ByteArrayInputStream just pass the byte array (byte[]) which you want to convert into InputStream.
InputStream stream = new ByteArrayInputStream(myBytes);
No comments:
Post a Comment