/**
* Streams in Java are mainly divided into byte stream and character stream
* Another angle analysis can be divided into input stream and output stream
* Input and output are a relative concept relative to the memory size of the JVM virtual machine
* From another point of view Java or other software developed in Java is just a tool.
* You can go deep in several ways, one is to make use of good tools, one is a retrofit tool, the other is a manufacturing tool
*/
try {
BufferedReader bufferedreader=new BufferedReader (New FileReader ("d:\\es Note \\ES Command"));
String readLine = null;
while ((Readline=bufferedreader.readline ())!=null) {
System.out.println (ReadLine);
}
} catch (FileNotFoundException e) {
E.printstacktrace ();
} catch (IOException e) {
E.printstacktrace ();
}
try {
Bufferedinputstream bufferedinputstream=new Bufferedinputstream (New FileInputStream ("d:\\es Note \\ES Command"));
int read = 0;
while ((read = Bufferedinputstream.read ())!=-1) {
System.out.print ((char) read);
}
} catch (Exception e) {
E.printstacktrace ();
}
/**
* Seemingly char can be converted between characters, Chinese characters and numbers, and the function of a personal understanding of char is the process of finding an ASCII code table.
*/
try {
String s= "22307 35806 24555 20048";//ascii code
string[] split = S.split ("");
for (String string:split) {
System.out.println ((char) integer.parseint (string));
}
} catch (Exception e) {
}
try {
String s= "Hello China";//ascii yards
string[] split = S.split ("");
for (String string:split) {
System.out.print ((int) String.charat (0) + "");
}
} catch (Exception e) {
}
Conversion between Java int type and character, kanji