<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ~~~ package com.youge.nio.zerocopy; /** * @author: hcf * @qq: 46914685 * @email: 46914685@qq.com * @date: 2020/11/27 11:56 */ import java.io.FileInputStream; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.channels.FileChannel; import java.nio.channels.SocketChannel; /** * NIO來傳輸讀寫文件 */ public class NewIOClient { public static void main(String[] args) throws IOException { //獲取socketChannel SocketChannel socketChannel = SocketChannel.open(); //連接服務器 boolean connect = socketChannel.connect(new InetSocketAddress("127.0.0.1",7002)); String fileName="phpstudy_install.dmg"; //得到一個文件channel FileChannel fileChannel = new FileInputStream(fileName).getChannel(); //準備發送 long startTime = System.currentTimeMillis(); //在linux下就transferTo()方法就可以完成傳輸 //在windows下調用transferTo()方法,一次只能發送8M的數據.如大于8M的數據,需要分段傳輸文件,需要記錄傳輸時的位置 //transferTo()方法底層使用到了零拷貝 long transferCount = fileChannel.transferTo(0, fileChannel.size(), socketChannel); System.out.println("發送總字節數:"+transferCount+",耗時:"+(System.currentTimeMillis()-startTime)); //釋放資源 fileChannel.close(); socketChannel.close(); } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看