• 大小: 1.42MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-17
  • 语言: 其他
  • 标签: 源码  工具  

资源简介

NULL 博文链接:https://vampire1126.iteye.com/blog/1113319

资源截图

代码片段和文件信息

package action;

import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.SocketChannel;

import tools.DataStandard;
import tools.FSConnector;

public class Download extends Thread{

private SocketChannel sc;
private String path;

public Download(String pathSocketChannel sc){
this.sc = sc;
this.path = path;
}

public void run(){
try{
ReadableByteChannel rChannel = FSConnector.getInputChannel(path);

ByteBuffer buffer = DataStandard.buffer;
buffer.clear();
while(rChannel.read(buffer)>=0){
buffer.flip();
sc.write(buffer);
buffer.compact();
}
rChannel.close();
System.out.println(“transmit completed!!!“);

}catch(Exception e){
e.printStackTrace();
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        420  2011-05-18 11:11  GiServer\.classpath

     文件        384  2011-04-22 14:41  GiServer\.project

     文件       1495  2011-06-22 09:40  GiServer\bin\action\Download.class

     文件       4042  2011-06-22 09:08  GiServer\bin\action\Upload.class

     文件     767492  2011-05-18 11:06  GiServer\bin\lib\mysql-connector-java-5.1.13-bin.jar

     文件       9473  2011-06-22 09:23  GiServer\bin\main\ReceiveControl.class

     文件       1674  2011-06-22 09:08  GiServer\bin\main\ServerMain.class

     文件       2087  2011-06-22 09:08  GiServer\bin\pojo\FileInfo.class

     文件        965  2011-06-22 09:08  GiServer\bin\pojo\UserInfo.class

     文件       6721  2011-06-22 09:08  GiServer\bin\tools\DatabaseTool.class

     文件        643  2011-06-22 10:16  GiServer\bin\tools\DataStandard.class

     文件       2230  2011-06-22 09:08  GiServer\bin\tools\FSConnector.class

     文件       2438  2011-06-22 09:08  GiServer\bin\tools\Message.class

     文件       1054  2011-06-22 09:08  GiServer\bin\tools\TemporaryStorage.class

     文件        761  2011-06-22 09:40  GiServer\src\action\Download.java

     文件       2585  2011-06-21 07:44  GiServer\src\action\Upload.java

     文件     767492  2011-05-18 11:06  GiServer\src\lib\mysql-connector-java-5.1.13-bin.jar

     文件       9164  2011-06-22 09:23  GiServer\src\main\ReceiveControl.java

     文件        927  2011-06-18 09:31  GiServer\src\main\ServerMain.java

     文件       1479  2011-04-29 10:58  GiServer\src\pojo\FileInfo.java

     文件        519  2011-04-29 02:41  GiServer\src\pojo\UserInfo.java

     文件       7574  2011-06-18 09:46  GiServer\src\tools\DatabaseTool.java

     文件        236  2011-06-22 10:16  GiServer\src\tools\DataStandard.java

     文件       1264  2011-05-18 09:25  GiServer\src\tools\FSConnector.java

     文件       1208  2011-05-18 15:01  GiServer\src\tools\Message.java

     文件        366  2011-06-02 11:39  GiServer\src\tools\TemporaryStorage.java

    ..AD...         0  2011-06-22 09:08  GiServer\bin\action

    ..AD...         0  2011-06-22 09:08  GiServer\bin\lib

    ..AD...         0  2011-06-22 09:08  GiServer\bin\main

    ..AD...         0  2011-06-22 09:08  GiServer\bin\pojo

............此处省略12个文件信息

评论

共有 条评论