String 按行读取时候 需要借助BufferedReader来处理,代码如下
String txt= extractor.getText();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(txt.getBytes());
InputStream inputStream = byteArrayInputStream;
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
BufferedReader r = new BufferedReader(reader);