使用一下语句即可,字符串存在String origdata中
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(origdata.getBytes(Charset.forName("utf8"))), Charset.forName("utf8")));
下面进行br.readline()即可
使用一下语句即可,字符串存在String origdata中
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(origdata.getBytes(Charset.forName("utf8"))), Charset.forName("utf8")));
下面进行br.readline()即可
本文标题:Java将字符串按行读取
本文链接:https://www.haomeiwen.com/subject/vlbkvxtx.html
网友评论