added parameter type inputstream and string2bytes