这是什么漫画?

漫画

especially especially
回答
  • 青春是把枪 青春是把枪

    j**a可以使用filechannel快速高效地将多个文件合并到一起,以下是详细代码:
    import static j**a.lang.system.out;import j**a.io.fileinputstream;import j**a.io.fileoutputstream;import j**a.io.ioexception;import j**a.nio.bytebuffer;import j**a.nio.channels.filechannel;import j**a.util.arrays;public class test {
    public static final int bufsize=1024*8;public static void mergefiles(string outfile,string[]files){
    filechannel outchannel=**;out.println("merge"+arrays.tostring(files)+"into"+outfile);try {
    outchannel=new fileoutputstream(outfile).getchannel();for(string f:files){
    filechannel fc=new fileinputstream(f).getchannel();bytebuffer bb=bytebuffer.allocate(bufsize);while(fc.read(bb)!1){
    bb.flip();outchannel.write(bb);bb.clear();}
    fc.close();}
    out.println("merged!} catch(ioexception ioe){
    ioe.printstacktrace();} finally {
    try {if(outchannel!**){outchannel.close();}} catch(ioexception ignore){}
    }
    }
    public static void main(string[]args){
    mergefiles("d:/output.txt",new string[]{"d:/in_1.txt","d:/in_2.txt","d:/in_3.txt"});}
    }

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活