???????????????
????????????????????????????????????????
??????????????????????ù?????????????????
????ASCII???????????????????????????7λ????????????
????ISO8859-1????????????????????????????????8λ???
????GB2312????????????????????????????????
????GBK??????????????????????????????????????
????GB18030??GBK??????汾
????BIG-5????????????????????????????????“??????”
????Uicode:????????????????????
????UTF-8:??Unicode??????????????????????????????????
????GBK????     ???????2????????????1?????
????UTF-8????   ???????3????????????1?????
????UTF-16be???????????2????????????2?????
????Java????????? utf-16be????java??????????????????
????????????????????б??????????????????????????????????????????????????s.getBytes("??????е??????");??????????????
??????????????????У?????????????????????У??????????????????????????????????????????????????ANSI(???????)?????磬??????TXT???????????????????????????????????????÷?????UTF-8????????
????Integer.toHexString(Byte);//???????????????
????????File??????????
????1??File?????????????????????
????File????????????????????????????????С????????????????????????
????2??File??????API???????
???????????????
?????????????createNewFile()??mkdir()??mkdirs()
????????????delete????
???????????????renameTo()
?????ж?????isFile()??isDirectory()??exists()??
????????????getName()??getPath()??list()??
????????????????????list(FilenameFilter filter)???????????????????????б?
?????ж????????????????IllegalArgumentException?????????
????File.separator????????????Windows??Unix?????
????????????????????????????????
????3????????????? dir.listFiles()??
?????????????????????????JVM???????????н??????????д????????????????????????????
????????RandomAccessFile??????
????1??RandomAccessFile java??????????????????????????????д
?????????????????????????????????????λ??
????2??Java??????
?????????????????byte byte byte?洢?????????????
????3???????
????1 RandomAccessFile raf =newRandomAccessFile(file??"rw");//rw????д??r???
????2 //????????????????????pointer = 0;
????3 raf.write(byte);//write???????д???????????????????????λ??
????4 int b = raf.read();//??ζ????????java??????????????????????????8λ???????д??
????5 raf.seek(???λ??);//??????
????6 raf.close();//?????д??????????????????????????????
????????????????????????????к????????????????????????????
??????????????????????????????????????????λ??
????????????(InputStream??OutputStream???????????????)
????1??I/O???????????豸???????????
????InputStream????????ó????????????
????OutputStream????????ó???д?????????
????2??EOF = End  ???? -1 ??????β
????3??????????????????????
????int b = in.read();//?????????????????int???λ??-1??EOF
????in.read(byte[] buf);//????????????????????
????4????????????????????д
????out.write(int b);
????out.write(byte[] buf);
????5??FileInputStream????????????????????
????while((b=in.read())!=-1){????????}
????in.close();//??????ù????????????
????????????????????Ч???? vs. ??????????????????????Ч?????
????6??FileOutputStream????????????????д????????
???????????????′?????????????????????????????????
???????????????copy????
????out.flush();
????out.close();
????7???????????????DataOutputStream/DataInputStream
?????????????????????????????????????????int??long??????????????????????????????????????
????8??????????BufferedInputStream/BufferedOutputStream
?????I/O???????????????????????????????I/O??????
????.write();
????.flush();//??????????????д?????????
????.close();
?????塢????????ο?API??
????1??Java??????????????
?????????????????????????????????ASCII??????????????
????????? = ?????+????
????????????????????????
????2??java???????char????16λ??????????????????Unicode?????????
?????????byte byte byte……??????????
??????????????????а?????????????л??byte??洢
????3?????????Reader Writer????????????????
??????δ???????????????????????????????????
????InputStreamReader ???byte?????????????char??
????OutputStreamWriter ??char??????????????byte??
????4???????д??  FileReader??FileWriter
????????????????????????????????
????5??????????????BufferedReader??BufferedWriter??PrintWriter
????readLine  ??????ζ???У????д???
?????????????????????У?????д?????в???