mimeType = blob.getMimeType();
mimeType = blob.getMetadata().getMimeType();
    public String getMimeType() throws XMLDBException {        if (isNewResource)            return mimeType;        DBBroker broker = null;        try {            broker = pool.get(user);            BinaryDocument blob = (BinaryDocument)getDocument(broker, false);            if (!blob.getPermissions().validate(user, Permission.READ))                throw new XMLDBException(                        ErrorCodes.PERMISSION_DENIED,                "permission denied to read resource");            mimeType = blob.getMimeType();            return mimeType;        } catch (EXistException e) {            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), e);        } finally {            pool.release(broker);        }    }