资源简介

java模仿电驴、迅雷实现多线程文件传输,可用于局域网或internet文件传输发送,程序采用套接字实现p2p(即点到点)文件传输。

资源截图

代码片段和文件信息

package trans;

import java.awt.Toolkit;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.Dimension;

public class Application1 {
    boolean packframe = false;

    /**
     * Construct and show the application.
     */
    public Application1() {
        Mainframe frame = new Mainframe();
        // Validate frames that have preset sizes
        // Pack frames that have useful preferred size info e.g. from their layout
        if (packframe) {
            frame.pack();
        } else {
            frame.validate();
        }

        // Center the window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        if (frameSize.height > screenSize.height) {
            frameSize.height = screenSize.height;
        }
        if (frameSize.width > screenSize.width) {
            frameSize.width = screenSize.width;
        }
        frame.setLocation((screenSize.width - frameSize.width) / 2
                          (screenSize.height - frameSize.height) / 2);
        frame.setVisible(true);
    }

    /**
     * Application entry point.
     *
     * @param args String[]
     */
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                try {
                    UIManager.setLookAndFeel(UIManager.
                                             getSystemLookAndFeelClassName());
                } catch (Exception exception) {
                    exception.printStackTrace();
                }

                new Application1();
            }
        });
    }
}

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

     文件      24593  2007-11-03 10:29  java文件p2p传输\classes\package cache\trans.dep2

     文件        725  2007-11-03 10:29  java文件p2p传输\classes\trans\Application1$1.class

     文件       1201  2007-11-03 10:29  java文件p2p传输\classes\trans\Application1.class

     文件       4910  2007-11-03 10:29  java文件p2p传输\classes\trans\Mainframe.class

     文件        665  2007-11-03 10:29  java文件p2p传输\classes\trans\Mainframe_jbtnSend_actionAdapter.class

     文件        674  2007-11-03 10:29  java文件p2p传输\classes\trans\Mainframe_jbtnSetting_actionAdapter.class

     文件        622  2007-11-03 10:29  java文件p2p传输\classes\trans\Mainframe_this_windowAdapter.class

     文件       2147  2007-11-03 10:29  java文件p2p传输\classes\trans\Server.class

     文件       4108  2007-11-03 10:29  java文件p2p传输\classes\trans\SettingDialog.class

     文件        695  2007-11-03 10:29  java文件p2p传输\classes\trans\SettingDialog_jbtnCancel_actionAdapter.class

     文件        683  2007-11-03 10:29  java文件p2p传输\classes\trans\SettingDialog_jbtnOK_actionAdapter.class

     文件      10575  2007-11-03 10:29  java文件p2p传输\classes\trans\SocketThread.class

     文件       5345  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFileDialog.class

     文件        707  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFileDialog_jbtnCancel_actionAdapter.class

     文件        701  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFileDialog_jbtnFile_actionAdapter.class

     文件        695  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFileDialog_jbtnOK_actionAdapter.class

     文件       5643  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFileManager.class

     文件       3662  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFilePanel.class

     文件        701  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFilePanel_jbtnCannel_actionAdapter.class

     文件        689  2007-11-03 10:29  java文件p2p传输\classes\trans\TransFilePanel_jbtnOK_actionAdapter.class

     文件       1729  2007-05-30 19:24  java文件p2p传输\src\trans\Application1.java

     文件       4695  2007-06-08 01:05  java文件p2p传输\src\trans\Mainframe.java

     文件       2023  2007-06-04 20:41  java文件p2p传输\src\trans\Server.java

     文件       4076  2007-05-30 19:24  java文件p2p传输\src\trans\SettingDialog.java

     文件      16056  2007-11-03 10:28  java文件p2p传输\src\trans\SocketThread.java

     文件       6676  2007-06-13 16:19  java文件p2p传输\src\trans\TransFileDialog.java

     文件       6924  2007-06-16 13:33  java文件p2p传输\src\trans\TransFileManager.java

     文件       4787  2007-06-04 21:35  java文件p2p传输\src\trans\TransFilePanel.java

     文件     194124  2007-11-03 10:29  java文件p2p传输\trans.exe

     文件      48175  2007-11-03 10:29  java文件p2p传输\trans.jar

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

评论

共有 条评论