久久久久久久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 獲取某些內容,您必須發出 FTP GET 命令,該命令將打開一個流向您的客戶端并開始通過該流發送請求文件的字節.現在大多數 FTP 客戶端收集所有這些字節并將它們寫入本地磁盤上的文件,但是您當然可以編寫一些不執行最后一部分的 Java 代碼,相反您可以選擇將字節寫入內存或解析它們當他們進來并丟棄其中的一些,等等.

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 的公共網絡庫來做到這一點的重點說明,因為我認為您應該首先了解您正在嘗試做的事情的基礎知識在你冒險使用一個在這一切之上進行抽象的庫之前.

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模板網!

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

相關文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環繞文本?)
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 數據庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 国产黄色免费看 | av免费在线观看网站 | 日韩精品在线观看视频 | 最新国产精品 | 在线日韩视频 | 欧美日韩中文字幕在线 | 国产一区久久 | 国产伦精品一区二区 | 18岁毛片| 91视频观看 | 国产精品欧美一区二区 | 激情五月激情综合网 | 天堂av网站 | 久久精品伊人 | 亚洲欧美精品一区二区 | 精品一区在线播放 | 成人永久免费视频 | avxxxxx | 国产黄色精品视频 | 九九香蕉视频 | 韩日在线视频 | 欧美日本在线 | 午夜视频免费观看 | 午夜伦理福利 | 日韩精品一级 | 国产黄色一区 | 91精品国产99久久久久久红楼 | 久热精品在线 | 国产精品久久午夜夜伦鲁鲁 | 欧美三级 欧美一级 | 亚洲精品一区二三区 | 亚洲激情五月 | 欧美日韩在线不卡 | 综合久久99 | 婷婷午夜天 | 午夜黄色小视频 | 成人在线视频免费观看 | 日本一级黄色 | 国产精品一区在线播放 | 欧美日韩免费在线 | 成人午夜视频在线观看 |