byte[] s = "aaa".getBytes(); ByteArrayInputStream ins= new ByteArrayInputStream(s); CharArrayInputStrem 也行。