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.

Comments:

Post a Comment:
Comments are closed for this entry.
About

ColmSmyth

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today