Hi Jukka,

> 
> We can add them back if we have an actual use for them, but until that
> I think we're better off without them.

Me too actually thinking about it more. +1

> 
>> Perhaps we should make MimeUtils have a parameter called "magic" in it, and
>> then use magic to determine whether or not we call
>> MimeTypes.getMimeType(byte [] data) versus calling the other methods.
>> What do you think about this?
> 
> Currently we only have the following method in MimeUtils:
> 
>     String getType(String typeName, String url, byte[] data)
> 
> Since we already have the data array available, we might just as well
> always do the MIME magic checks. If we want to support non-magic
> checks, then we should add another signature for that:
> 
>     String getType(String typeName, String url)

Yep, the way I envision it is that MimeUtils is really a decorator around
MimeTypes. MimeUtils should provide construction facilities and management
around the MimeTypes repo, so it probably makes sense to add a few more
method signatures to it, and expose a bit more of the functionality (and at
the same time, remove the getRepository() function).

Sound good?

Cheers,
  Chris


> 
> BR,
> 
> Jukka Zitting

______________________________________________
Chris Mattmann, Ph.D.
[EMAIL PROTECTED]
Cognizant Development Engineer
Early Detection Research Network Project

_________________________________________________
Jet Propulsion Laboratory            Pasadena, CA
Office: 171-266B                     Mailstop:  171-246
_______________________________________________________

Disclaimer:  The opinions presented within are my own and do not reflect
those of either NASA, JPL, or the California Institute of Technology.


Reply via email to