code: public static String getMimeType(byte[] barr, String defaultValue) {
  	PrintStream out = System.out;
  	try {
  	    Tika tika = new Tika();
  	    return tika.detect(barr);
  	}
  	catch (Throwable t) {
  	    ExceptionUtil.rethrowIfNecessary(t);
  	    return defaultValue;
  	}
      }
docs: return the mime type of a file, dont check extension
  
  @param barr
  @return mime type of the file
  @throws IOException