久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在不下載的情況下從 FTP 讀取文件?

How to read files from FTP without download them?(如何在不下載的情況下從 FTP 讀取文件?)
本文介紹了如何在不下載的情況下從 FTP 讀取文件?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

在我的索引文件程序代碼中,我需要訪問 FTP 文件并閱讀所有文件而不下載它們,我如何使用 org.apache.commons.net 庫來做到這一點?

In my index file program code i need to access to FTP files and read all of them without download them,how can i do that with org.apache.commons.net library?

推薦答案

我不太清楚你所說的下載"是什么意思.為了通過 FTP 獲取某些內(nèi)容,您必須發(fā)出 FTP GET 命令,該命令將打開一個流向您的客戶端并開始通過該流發(fā)送請求文件的字節(jié).現(xiàn)在大多數(shù) FTP 客戶端收集所有這些字節(jié)并將它們寫入本地磁盤上的文件,但是您當然可以編寫一些不執(zhí)行最后一部分的 Java 代碼,相反您可以選擇將字節(jié)寫入內(nèi)存或解析它們當他們進來并丟棄其中的一些,等等.

Well I'm not really sure what you mean by "download". In order to get something via FTP you must issue the FTP GET command which will open a stream towards your client and start sending the bytes of the requested file via that stream. Now most FTP clients gather up all those bytes and write them to a file on the local disk, but you can ofcourse make some Java code that does not do that last part, instead you may choose to write the bytes in memory, or parse them as they come in and discard some of them, etc.

是的,我確實意識到我并沒有向您提供有關(guān)如何使用 Apache 的公共網(wǎng)絡(luò)庫來做到這一點的重點說明,因為我認為您應(yīng)該首先了解您正在嘗試做的事情的基礎(chǔ)知識在你冒險使用一個在這一切之上進行抽象的庫之前.

And yes, I do realise that I'm not giving you to the point instructions on how to use Apache's commons net library to do that, because I believe that you should first understand the basics of what you're trying to do before you venture into using a library that makes an abstraction on top of it all.

查看基本的 FTP 操作:

Look up the basic FTP operations:

http://www.cs.colostate.edu/helpdocs/ftp.html

首先是 Java I/O 的基礎(chǔ)知識:

and the basics of Java I/O first:

http://download.oracle.com/javase/tutorial/essential/io/

這篇關(guān)于如何在不下載的情況下從 FTP 讀取文件?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 久久91| 亚洲经典一区 | 国产精品特级毛片一区二区三区 | 91麻豆精品国产91久久久更新资源速度超快 | 中文字幕精品一区二区三区在线 | 欧美freesex黑人又粗又大 | 国产成人免费视频网站高清观看视频 | 中文字幕免费在线 | 四虎影院在线免费观看 | 亚洲毛片一区二区 | 国产精品色 | 欧美日韩三级 | 在线观看www视频 | 国产美女在线精品免费 | 国产精品久久 | 久久综合久久久 | 精品国产一区二区三区观看不卡 | 国产aⅴ爽av久久久久久久 | 久久亚洲国产精品 | 久久精品国产免费 | 久久精品久久久 | 天天干天天玩天天操 | 中文字幕精品一区二区三区精品 | 欧美在线一级 | 免费视频二区 | 丝袜美腿av| 天天夜夜操 | 欧美综合久久 | 日韩在线播放视频 | 欧美视频三区 | 羞羞视频免费在线观看 | av网站在线看 | 中文字幕精品一区 | 日韩av手机在线观看 | 久久亚洲欧美日韩精品专区 | 国产精品一区二区三区免费观看 | 中文字幕在线一区二区三区 | 在线观看www视频 | 国产主播第一页 | 国内自拍第一页 | 国产分类视频 |