You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alan Grimes <ag...@speakeasy.net> on 2009/10/06 17:52:46 UTC
FTP library.
I've been trying to grok the NET/FTP library for several hours now and
I've only met with frustration so far. It's really quite remarkable how
well the documentation explains how to do practically anything under the
sun to a FTP archive *EXCEPT DOWNLOAD A FILE*. That's right, I can't
figure out how one is supposed to download a file. I can't find any
methods such as "getObjectBits" or "downloadFileText", or any examples
that involve downloading a file. There are no objects such as
FTPDataStream. FTPFile seems to be useless for anything other than
accessing file attributes. This is certainly a major documentation if
not design problem!!! =(
--
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Inherent problem with Java classes.
Posted by James Carman <ja...@carmanconsulting.com>.
Basically, if you just want to use FTP for now, you need to have
Commons Net (yes the one you tried to use :) on the classpath:
http://commons.apache.org/vfs/download.html
You'll also need Commons Logging and some logging provider (log4j, jdk
logging, etc.).
On Wed, Oct 7, 2009 at 2:20 PM, Alan Grimes <ag...@speakeasy.net> wrote:
> James Carman wrote:
>> This should get you started:
>>
>> http://commons.apache.org/vfs/api.html
>>
>> You'll want to make sure you've got everything you need on the
>> classpath so that all of the file system types you need are enabled.
>
> Thanks much, I guess i have trouble finding things in lengthy lists of
> stuff. (also, I've been wasting too much time on my C++ project,
> ktechlab, hacking on that thing is crack. =P )
>
> --
> New president: Here we go again...
> Chemistry.com: A total rip-off.
> Powers are not rights.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Inherent problem with Java classes.
Posted by Alan Grimes <ag...@speakeasy.net>.
James Carman wrote:
> This should get you started:
>
> http://commons.apache.org/vfs/api.html
>
> You'll want to make sure you've got everything you need on the
> classpath so that all of the file system types you need are enabled.
Thanks much, I guess i have trouble finding things in lengthy lists of
stuff. (also, I've been wasting too much time on my C++ project,
ktechlab, hacking on that thing is crack. =P )
--
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: Inherent problem with Java classes.
Posted by James Carman <ja...@carmanconsulting.com>.
This should get you started:
http://commons.apache.org/vfs/api.html
You'll want to make sure you've got everything you need on the
classpath so that all of the file system types you need are enabled.
On Wed, Oct 7, 2009 at 1:53 PM, Alan Grimes <ag...@speakeasy.net> wrote:
> There's an inherent problem with all classes and class packages of all
> languages. Basically when you package up a bundle of classes there are
> few clues for a novice to determine which classes are for internal use
> only and which are the primary front end of the API. Similarly, when
> there are dozens of non-depreciated methods in a class, it becomes
> difficult for a novice to determine which are the critical calls that
> every application will inevitably use and which are there just to handle
> corner cases or special applications. This is why I had trouble finding
> the call for dowloading a file in the FTP system.
>
> Javadoc is wonderful. It certainly does help when one needs a
> refference. The VFS package seems to be closer to what I actually need,
> but at the same time it's much more complex. This is why HowTos and
> other tutorials are vitally important for all non-trivial packages,
> especially packages for use as libraries. =(
>
> Do you know where I can find useful getting started guides for VFS?
>
>
> --
> New president: Here we go again...
> Chemistry.com: A total rip-off.
> Powers are not rights.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Inherent problem with Java classes.
Posted by Alan Grimes <ag...@speakeasy.net>.
There's an inherent problem with all classes and class packages of all
languages. Basically when you package up a bundle of classes there are
few clues for a novice to determine which classes are for internal use
only and which are the primary front end of the API. Similarly, when
there are dozens of non-depreciated methods in a class, it becomes
difficult for a novice to determine which are the critical calls that
every application will inevitably use and which are there just to handle
corner cases or special applications. This is why I had trouble finding
the call for dowloading a file in the FTP system.
Javadoc is wonderful. It certainly does help when one needs a
refference. The VFS package seems to be closer to what I actually need,
but at the same time it's much more complex. This is why HowTos and
other tutorials are vitally important for all non-trivial packages,
especially packages for use as libraries. =(
Do you know where I can find useful getting started guides for VFS?
--
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by Mark Shifman <ma...@yale.edu>.
I know this is a commons user list but ...
edtftp library works well. There is a free version and it does the things you know about
with ftp ie get, and put.
If you need to use streams, you can do that too.
http://www.enterprisedt.com/products/edtftpj/
mas
Alan Grimes wrote:
> James Carman wrote:
>> Have you tried Commons VFS? It might be easier.
>
> No, I'm basically groping in the dark. I put ftp into google, and
> net/ftp appears to be the most high-profile project from the apache
> foundation which appears to have the most mature set of Java libraries
> available.
>
> I feel like I'm the victim of a practical joke where you name one
> package with exactly the terms I would type into google, and then make a
> different package that is actually useful. =P
>
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
mark.shifman@yale.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by Alan Grimes <ag...@speakeasy.net>.
> Heh, too funny. Commons Net will do what you want, but it's meant to
> be a lower-level API, more closely tied to the protocols themselves.
> Commons VFS builds a file system abstraction on top of all kinds of
> protocols (local files, ftp, http, etc.). To me, it's easier to get
> that up and running and if I ever want to change it in the future to a
> different technology, I can without changing my client code, since
> it's using the abstraction.
Yes, it looks that way.
My problem involves finding and retrieving files from a FTP archive
which may or may not be on the same host I'm running my program on.
(hence the flexibility to switch between files and FTP objects is
important to me.)
Ideally, I'd be able to treat these as strings or something and pass
them directly into a CSV library to extract records... I'll pipe up
again if I have further issues.
--
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by James Carman <ja...@carmanconsulting.com>.
On Tue, Oct 6, 2009 at 12:12 PM, Alan Grimes <ag...@speakeasy.net> wrote:
> James Carman wrote:
>> Have you tried Commons VFS? It might be easier.
>
> No, I'm basically groping in the dark. I put ftp into google, and
> net/ftp appears to be the most high-profile project from the apache
> foundation which appears to have the most mature set of Java libraries
> available.
>
> I feel like I'm the victim of a practical joke where you name one
> package with exactly the terms I would type into google, and then make a
> different package that is actually useful. =P
Heh, too funny. Commons Net will do what you want, but it's meant to
be a lower-level API, more closely tied to the protocols themselves.
Commons VFS builds a file system abstraction on top of all kinds of
protocols (local files, ftp, http, etc.). To me, it's easier to get
that up and running and if I ever want to change it in the future to a
different technology, I can without changing my client code, since
it's using the abstraction.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by Alan Grimes <ag...@speakeasy.net>.
James Carman wrote:
> Have you tried Commons VFS? It might be easier.
No, I'm basically groping in the dark. I put ftp into google, and
net/ftp appears to be the most high-profile project from the apache
foundation which appears to have the most mature set of Java libraries
available.
I feel like I'm the victim of a practical joke where you name one
package with exactly the terms I would type into google, and then make a
different package that is actually useful. =P
--
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by James Carman <ja...@carmanconsulting.com>.
Have you tried Commons VFS? It might be easier.
On Tue, Oct 6, 2009 at 11:52 AM, Alan Grimes <ag...@speakeasy.net> wrote:
> I've been trying to grok the NET/FTP library for several hours now and
> I've only met with frustration so far. It's really quite remarkable how
> well the documentation explains how to do practically anything under the
> sun to a FTP archive *EXCEPT DOWNLOAD A FILE*. That's right, I can't
> figure out how one is supposed to download a file. I can't find any
> methods such as "getObjectBits" or "downloadFileText", or any examples
> that involve downloading a file. There are no objects such as
> FTPDataStream. FTPFile seems to be useless for anything other than
> accessing file attributes. This is certainly a major documentation if
> not design problem!!! =(
>
>
> --
> New president: Here we go again...
> Chemistry.com: A total rip-off.
> Powers are not rights.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP library.
Posted by Steve Cole <sc...@camsbycbs.com>.
OutputStream output = new FileOutputStream(localFilename);
ftpsClient.retrieveFile(remoteFilename, output);
output.close();
----- Original Message -----
From: "Alan Grimes" <ag...@speakeasy.net>
To: "Commons Users List" <us...@commons.apache.org>
Sent: Tuesday, October 06, 2009 11:52 AM
Subject: FTP library.
> I've been trying to grok the NET/FTP library for several hours now and
> I've only met with frustration so far. It's really quite remarkable how
> well the documentation explains how to do practically anything under the
> sun to a FTP archive *EXCEPT DOWNLOAD A FILE*. That's right, I can't
> figure out how one is supposed to download a file. I can't find any
> methods such as "getObjectBits" or "downloadFileText", or any examples
> that involve downloading a file. There are no objects such as
> FTPDataStream. FTPFile seems to be useless for anything other than
> accessing file attributes. This is certainly a major documentation if
> not design problem!!! =(
>
>
> --
> New president: Here we go again...
> Chemistry.com: A total rip-off.
> Powers are not rights.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org