add convert input stream to byte array method