Tom Tromey wrote:
I'm submitting this for comment before checking it in.

This implements URLConnection.guessContentTypeFromStream.  It adds a
new VMURLConnection class to which the method defers.  The reference
implementation of this VM class uses 'libmagic' to guess the content
type; libmagic is part of the 'file' package on Linux systems and
presents a nice, simple API to this functionality.

Please comment.


I don't know if I like the idea of having a dependency on libmagic. I know that I can still build without it, but how crippled will my system be? Probably no more than it is now as I don't currently use these methods anyhow.

I can't find libmagic listed in the LSB 3.1 standard, so it may not even work on a 'typical' desktop system.

That probably sounds kind of negative, but it is not meant to. I think I would prefer a java implementation, but don't really have strong feelings one way or the other.

David Daney

Reply via email to