BufferedOutputStream输出不完整?

import java.io.BufferedInputStream;

import java.io.BufferedOutputStream;

import java.io.FileInputStream;

import java.io.FileOutputStream;

import java.io.IOException;

public class Text{

  public static void main(String[] args) throws IOException{

    byte[] buf = new byte[1024];

    FileInputStream input = new FileInputStream("D:\\Text\\Class\\Test.java");

    BufferedInputStream bufferinput = new BufferedInputStream(input);

    FileOutputStream output = new FileOutputStream("D:\\Text\\new_test.txt");

    BufferedOutputStream bufferoutput = new BufferedOutputStream(output);

    while( bufferinput.read(buf) != -1){

      bufferoutput.write(buf,0,buf.length);

    }

    bufferoutput.flush();

    bufferoutput.close();

    output.close();

    bufferinput.close();

    input.close();

    System.out.println("已结束!");

  }

}

原文档是http://img.mukewang.com/57ba611d0001da8f06780703.jpg但输出只,读读到最后continue那,后面的分号及最后的几个}都没有,为什么?

weibo_快乐is魏帆_0
浏览 2200回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java