久久久久久久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(使用線程逐塊處理文件)
主站蜘蛛池模板: 伊人久操 | 国产资源在线观看 | 国产精品91视频 | 亚洲精品女优 | 亚洲成人av在线播放 | 精品影视| 国产精品久久久亚洲 | 秋霞在线一区二区 | 在线观看黄色大片 | 日韩中文字幕在线观看视频 | 国产精品大片在线观看 | 特黄毛片视频 | 美女黄网 | 中文字幕高清一区 | 欧美一级全黄 | 中国一级特黄毛片大片 | 欧美精品一区二区三区一线天视频 | 欧美综合国产精品久久丁香 | 在线视频a| 在线观看亚洲专区 | 久久久国产视频 | 四虎成人精品永久免费av九九 | 九九热re | 久久久精品黄色 | 天天干夜夜操视频 | 久久亚洲一区 | 免费一级欧美在线观看视频 | 国产成人免费在线 | 亚洲电影免费 | 欧美一级毛片在线播放 | 日韩精品一区二区在线观看 | 一级黄色影片在线观看 | 国产二区精品视频 | wwww.8888久久爱站网 | 在线国产欧美 | 亚洲第一女人av | 欧美bondage紧缚视频 | 天天看天天干 | 久久久亚洲一区 | 欧美日韩视频在线第一区 | 日韩欧美网 |