made input stream as byte[]