日期:2014-05-20 浏览次数:20925 次
public static void main(String[] args) throws Exception {
		byte[] buffer = new byte[4 * 1024];
		InputStream is=new ByteArrayInputStream(buffer);
		OutputStream os=new FileOutputStream("d:/e.txt");
		int i=is.read();
		while (i!=-1) {
		os.write(i);
		System.out.println("a");
		}
public static void main(String[] args) {
try {
BufferedInputStream is=new BufferedInputStream(new FileInputStream(new File("D:\\colorsize.txt")));
byte[] buffer = new byte[4 * 1024];
while (-1 != is.read(buffer)) {
System.out.println("a");
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}