Update InputStream and ByteBuffer