摘要: public class StreamDemo6 { public static void main(String[] args) { try { //不自动刷新,后面可以添加一个参数 true,来自动刷新 PrintStream ps = new PrintStream(new File... 阅读全文
posted @ 2016-01-24 14:32 烧山火的光 阅读(236) 评论(0) 推荐(0) 编辑
摘要: public class StreamDemo5 { public static void main(String[] args) { try { byte[] b = new byte[10000]; System.out.println("请输入:"); while(tru... 阅读全文
posted @ 2016-01-24 14:29 烧山火的光 阅读(185) 评论(0) 推荐(0) 编辑
摘要: import java.io.BufferedOutputStream;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.FileInputStream;import java.io.FileO... 阅读全文
posted @ 2016-01-24 14:28 烧山火的光 阅读(153) 评论(0) 推荐(0) 编辑
摘要: public class StreamDemo3 { public static void main(String[] args) { try { //管道流 PipedInputStream in = new PipedInputStream(); PipedOutputStream... 阅读全文
posted @ 2016-01-24 14:27 烧山火的光 阅读(168) 评论(0) 推荐(0) 编辑
摘要: public class StreamDemo2 { public static void main(String[] args) { try { BufferedInputStream bis = new BufferedInputStream( new FileInputStrea... 阅读全文
posted @ 2016-01-24 14:25 烧山火的光 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 3.以字节为单位的输入输出流 输入流:InputStream(读) ----> FileInputStream 把文件作为字节流进行读操作 ----> BufferedInputStream(缓冲区的,先读入... 阅读全文
posted @ 2016-01-24 14:24 烧山火的光 阅读(140) 评论(0) 推荐(0) 编辑