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

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

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

問題描述

在我的索引文件程序代碼中,我需要訪問 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.

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

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 的基礎知識:

and the basics of Java I/O first:

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

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

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(liá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(使用線程逐塊處理文件)
主站蜘蛛池模板: 免费日韩网站 | xnxx 日本免费 | 国产亚洲一级 | 免费v片| 午夜一级黄色片 | 欧美精品在线播放 | 精品国产黄色片 | 亚洲av毛片| 精品国产一区二区三区性色av | 日韩和的一区二在线 | 日韩视频中文字幕 | 巨大黑人极品videos精品 | 精品国产乱码久久久久久1区2区 | 国产91观看 | 乱一性一乱一交一视频a∨ 色爱av | 国产一区二区在线视频 | 亚洲黄色片免费观看 | 欧美又大粗又爽又黄大片视频 | 成人在线播放网站 | 老司机午夜性大片 | 中文字幕免费视频 | 一区二区三区观看视频 | 日日干日日射 | 亚洲免费影院 | www.一区二区三区 | 日本小电影在线 | 蜜桃视频在线观看www社区 | 亚洲在线 | 中文字幕一区二区三区四区 | 一色一黄视频 | 日本黄色不卡视频 | 黄色片网站在线观看 | 欧美一区二区网站 | 少妇诱惑av | 国产精品国产a级 | 中文成人在线 | 成人免费精品 | 国产免费福利在线 | 国产精彩视频在线观看 | 精品中文字幕久久 | 亚洲欧美视频一区二区 |