Hi,
On 10/14/07, Chris Mattmann <[EMAIL PROTECTED]> wrote:
> Ah, wait. Ok, it seems that the "magic" parameter was never used I'm
> guessing, right? Well, I understand you removing it then.
Correct, the parameter was never used. The same goes for the methods I removed.
We can add them back if we have an actual use for them, but until that
I think we're better off without them.
> 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)
BR,
Jukka Zitting