提示
Java IO StringReader 使用示例。@ermo
public static void read() throws IOException {
String data = "Some simple text.";
StringReader reader = new StringReader(data);
char[] outputChar = new char[200];
try {
reader.read(outputChar);
} finally {
reader.close();
}
System.out.println(outputChar);
}
public static void main(String[] args) throws IOException {
read();
}