freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

文件傳輸協(xié)議的簡單設(shè)計與實現(xiàn)(參考版)

2025-06-02 22:04本頁面
  

【正文】 。參考文獻[1] 葉至軍.Java2自學(xué)教程[M].北京:人民郵電出版社,:第69頁至第73頁,第156頁至第161頁。解決方法:使用Socket、ServerSocket類的close()及時關(guān)閉套接字。解決方法:用JTree類的getSelectionPath()方法獲得路徑信息,但這些信息并不是正確的路徑格式,因此還需要用String類下的substring進行處理。 客戶端界面的目錄文件樹與本地及服務(wù)器目錄文件一一對應(yīng)問題 客戶端界面中用JTree類構(gòu)造本地的目錄文件樹和服務(wù)器的目錄文件樹。}}5 調(diào)試過程中出現(xiàn)的問題及相應(yīng)解決辦法 SOCKET以及SERVERSOCKET的應(yīng)用問題 由于數(shù)據(jù)傳輸端口只在需要的時候打開并且在傳送完畢后立即關(guān)閉,所以經(jīng)常會在關(guān)閉之后端口不再打開;而且在登錄失敗時,要斷開控制字端口來避免本地端口的占用。}catch (Exception e) {}}}).start()。}else(null, 請選擇一個文件!!)。//根據(jù)新的列表重構(gòu)目錄樹(0)。ftree = new JTree(dd)。()。}}()。)。//讀取數(shù)據(jù)while (bool||str != null) {if (str != null) {(str + 39。BufferedReader br0 = new BufferedReader(new InputStreamReader(is_data))。//請求獲得新的列表s = ()。FileWriter fw = new FileWriter(().substring(0,().indexOf(.))+)。//上傳成功,關(guān)閉相應(yīng)資源bool = true。()。//傳送數(shù)據(jù)}(null,new JLabel(上傳成功!))。byte[] bytebuffer = new byte[1024]。int count。//發(fā)送上傳請求和文件名ss = new Socket(sip, 2326)。//得到本地文件路徑File re=new File((, ,/))。}}).start()。}}else(null, 請選擇一個文件夾用于下載)。()。()。()。setTree((, ,/),rootTree2)。while ((count = (bytebuffer)) != 1) {(bytebuffer, 0, count)。//建立本地相應(yīng)文件byte[] bytebuffer = new byte[1024]。//監(jiān)聽數(shù)據(jù)is_data = ()。//獲得本地保存路徑File re0=new File((, ,/))。//獲得下載的文件名(get +(, ,/))。amp。//將樹插入滾動條} catch (Exception e) {}}}).start()。//調(diào)用setftree函數(shù)構(gòu)建樹(0)。 = new JTree(dd)。()。}}()。)。//讀出數(shù)據(jù)while (|| str != null) {if (str != null) {(str + 39。BufferedReader br0 = new BufferedReader(new InputStreamReader())。//發(fā)送目錄列表請求 = ()。FileWriter fw = new FileWriter(().substring(0,().indexOf(.))+)。}}} 請求目錄列表:new Thread(new Runnable() {//啟動List處理線程public void run() {try { = true。add(jb0)。FlowLayout fl = new FlowLayout()。}}class ButtonPane extends JPanel {//界面布局JButton jb0 = new JButton(確定)。add(jl0)。FlowLayout fl = new FlowLayout()。}}class EditPane2 extends JPanel {//界面布局JLabel jl0 = new JLabel(口令:)。add(jl0)。FlowLayout fl = new FlowLayout()。}}class EditPane1 extends JPanel {//界局布局JLabel jl0 = new JLabel(用戶名:)。add(jl0)。FlowLayout fl = new FlowLayout()。}}class EditPane0 extends JPanel {//界面布局JLabel jl0 = new JLabel(目標主機IP:)。 = fill。 = weightx。 = gridwidth。}}class MakeConstraints {//布局設(shè)置void set(GridBagConstraints gbc0, int gridx, int gridy, int gridwidth,int gridheight, double weightx, double weighty, int fill,int anchor) { = gridx。//發(fā)送用戶信息給服務(wù)器進行驗證setVisible(false)。}}).start()。}} catch (IOException e) {// (null, new// JLabel(連接FTP服務(wù)器失敗!))。//關(guān)閉套接字bbb = false。()。(null,new JLabel(與FTP服務(wù)器退出連接!))。(false)。()。new Thread(new Runnable() { //省略部份代碼public void run() {…}}.start//啟動List處理線程}if ((555)) {//List傳送完畢 = false。(false)。(true)。String sr = ()。new Thread(new Runnable() {//啟動客戶線程public void run() {while (bbb) {try { = ()。} catch (IOException e1) {()。//建立Socket和ServerSocket套接字} catch (IOException e1) {()。} else {try { = new ServerSocket(2326)。password = ().trim()。 = ().trim()。show()。}(( ) / 2,( ) / 2)。if ( ) { = 。Dimension screenSize = ()。(this)。getContentPane().add(bp)。(gbc, 0, 3, 1, 1, 100, 25, ,)。(ed2, gbc)。getContentPane().add(ed1)。(gbc, 0, 1, 1, 1, 100, 25, ,)。(ed0, gbc)。getContentPane().setLayout(gbl)。setDefaultCloseOperation(EXIT_ON_CLOSE)。boolean bbb = true。static Stri
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1