On Thu, 2006-05-25 at 11:39 -0600, 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. >
Looks good to me. I don't really have any concerns about libmagic. It's included with all Linux distos I know of (even if isn't in LSB), all BSD distros I know of and even OS X. So short of having no external dependency at all, this is probably as good as it can get. /Sven
