Jean-Christophe Collet's Weblog
Jean-Christophe Collet's Weblog

20080523 Friday May 23, 2008

FTP client API for JDK7

Introduction

For quite a while now I have been working on RFE 4650689 (RFE: Java needs public API for FTP) which has finally been approved for JDK 7 (don't ask).

I figured it's about time I post a draft of the API we've been working on and get some feedback from the community.

First and foremost, you have to realize that we already have an FTP API (see my earlier blog entry on that front) and that the new one has to be compatible with it. We do not want two implementations of the FTP protocol (bloat is bad, Mmmmkay?), so the proposed FTP client has to be usable by the existing protocol handler sun.net.www.protocol.ftp.FtpURLConnection. This had an impact on the design. Basically, we started from the existing code (residing in sun.net.ftp.FtpClient) and extended that.

Supported features

The goal was to support as much as possible of the existing RFCs: 959, 2228, 2389, 2428, and 4217. Some of the features in these RFCs are, however, rather obsolete so we used our best judgment as to what to actually implement. Feel free to correct us if you are convinced we are missing an important part.

The most notable features gained from the new API are:

  • Multiple transfers per session which was not possible with the URL, URLConnection model.
  • Resume interrupted downloads.
  • 'Smart' directory listing with pluggable parser.
  • Directory manipulation: mkdir, rmdir, cd, cdup, pwd.
  • SSL/ftps support, including an FTPS protocol handler to work with URL/URLConnection.

API

If you want more details, check the current draft of the javadoc. Be aware that there is no guarantee that this will be the final API, or even that this feature will make the final JDK 7 cut. It still has to go through the approval process.

Feedback is not only welcome, it is very encouraged. So if you have any remarks, or requests, please drop me a note or, even better, use the openjdk networking email alias.

(2008-05-23 08:14:36.0) Permalink Comments [1]

20080521 Wednesday May 21, 2008

Indiana Jones and the kingdom of the crystal skull

I was not at Cannes for the world premiere, but I was able to attend the first show of the new Indiana Jones movie here in Geneva. This was last night at 0:01 am. I love going to these special shows. The atmosphere is so different, mostly because the audience is entirely made of fellow movie lovers (you have to be to go to a movie theater between midnight and 2am). I'll grant you that Geneva is probably the wrong place for that. No offense, but people here are certainly not as exuberant as they can be in Paris or California for instance. And that's putting it mildly. A good proof of that was that the theater was hardly full. Still, that was a good natured audience and one guy even brought his trumpet and played the Indiana Jone themes a couple of time. He was pretty good at it and was rewarded by a big cheer.

But enough about all that, let's talk about the movie now.

 Of course, as it has been said repeatedly, there is basically no way a 4th Indiana Jones movie can meet expectations after all these years. And, unfortunately, it, indeed, doesn't. If I had to compare it to the other 3, I'd say it's not nearly as good as the first and third, but probably on par with number 2 (The temple of Doom) which I always considered to be the weakest, by a large margin, of the 3. Actually, the failings of the new movie have a lot in common with those of Temple of Doom. More on that later.

 I will not give you a summary of the plot, except to say that the action takes place in the 50s, that the Russians have replaced the Nazis, and that the Amazon has replaced Egypt. There is plenty of action and a lot of fun, but, it's rather nonsensical most of the time. Indiana Jones movies have always been a bit over the top and that is actually a major part of the fun, but this time it's way, way over the top. Surviving a nuclear blast by hiding in a fridge kind of over the top (no, I'm not making that up). One of the results is that the chase sequences are overdrawn and a lot cheesier than they should be.

The script also has a few problems. For instance, at the beginning it looks like it's trying to make a political point (against the communist-witch-hunt of the time) even if it seemed a bit forced. But then, abruptly and for no apparent reason, that plot is just dropped. Plain and simple. Gone, forgotten. I did find that annoying.

An other, and much more important, problem is the the 'quest' itself. We just don't really care about it. Looking for the Lost Ark or the Holy Grail was intriguing, exciting. It was rooted deep in our psyche. Searching for clues as to where these precious artifacts might be was a major part of the fun in the previous movies. Here, not only the plot has no echo in our minds, except for an unconvincing link to ElDorado, but there is no archeology (even fake one) going on. That's where, I think, it fails in a similar way as Temple of Doom. The historical (or pseudo historical) aspect of Indiana Jones is just missing. To make matter worse there is no 'treasure hunt' with hidden clues and so on, to speak of. All they have to do is go back to a place where one of them has already been. Which is easy, since that person is with them all along. Not very exciting.

All that aside it's still a mostly fun movie to watch. And more importantly, the movie stays true to the spirit and mythos of Indiana Jones. To me that was like going to visit an old, and dear, friend I hadn't seen in years. Sure enough the party was not as fun as before and there were a couple of awkward moments. But I was glad to see him again, in a good shape. We had fun together and I, as many, left the theater with a smile on my face.

(2008-05-21 07:20:38.0) Permalink


archives
links
referers