read_from_inputstream modifies