Colm Smyth's Weblog
Gestalt Blogology
   

20041129 Monday November 29, 2004

Java Libraries for Web File Protocols (http, webdav, ftp)

I recently needed to develop a pure-Java prototype application that supported multiple web protocols. The JDK comes with built-in support that meet the needs of many application developers who primarily want to interact with web protocols using URLs (effectively the same way that a end-user uses a browser).

If you have tried the standard JDK libraries and you need more, the table below contains a summary of my brief investigations and the libraries I chose to use. You'll notice I favoured Jakarta's libraries - that's because they're generally very functional, well supported and they have open-source licenses that permit use and contribution by both open and closed source developers.

Protocol
(spec link)
Information/Desired features Suggested library
http Features (and pointer to library comparison) Desired features

  • HTTPS, HTTP proxy support
  • Authentication (Basic, Digest and NTLM)
  • Automatic Cookie response
  • Connection timeouts
Apache Jakarta HttpClient - javadoc

HttpClient implements the following IETF standards:

  • RFC1945 Hypertext Transfer Protocol -- HTTP/1.0
  • RFC2616 Hypertext Transfer Protocol -- HTTP/1.1
  • RFC2617 HTTP Authentication: Basic and Digest Access Authentication
  • RFC2109 HTTP State Management Mechanism (Cookies)
  • RFC2396 Uniform Resource Identifiers (URI): Generic Syntax
  • RFC1867 Form-based File Upload in HTML
webdav Features Desired features
  • Versions
  • Collections
  • Properties
  • Access control
  • Locking
Apache Jakarta Slide (client) - javadoc - article
ftp (extensions) Java FTP client libraries reviewed Apache Jakarta Commons Net (FTP) - javadoc

In addition to FTP, this library also implements FTP, NNTP, SMTP, POP3, Telnet, TFTP, Finger, Whois, rexec/rcmd/rlogin, Time (rdate) and Daytime, Echo, Discard.

If you want an abstract API that sits on top of other web protocols, take a look at the Filesystems API in the NetBeans Open APIs suite; the Explorer and Modules APIs also look useful. I hope to find some time to probe NetBeans in more depth one of these dark winter evenings.

I can recommend the Hamsam Instant Messaging API abstraction for Yahoo, MSN and AOL support. Smack completes the IM picture by providing XMPP (Jabber) suppport.

Finally, if you're looking for an implementation for another protocol, freshmeat "java protocol -GPL" is certainly not the worst place to start, especially if you drill-down further using the advanced search option.

(2004-11-29 10:38:54.0) Permalink

The Future of UNIX

Jonathan clarifies on OSNews that Solaris does not compete with open-source operating systems such as Linux or BSD that are based on open standards; it competes with proprietary operating systems (or distributions) from companies like Red Hat and Microsoft.

Eric Schrock also knocks some misperceptions about OpenSolaris firmly on the head; read his lips: Is there anything preventing [Sun] from making all of Solaris open-source? Nothing at all. And let me repeat that. Nothing at all.

(2004-11-29 10:19:43.0) Permalink


archives
links
referers