How about:

    Uri.Builder builder = Uri.parse(mHoot.getBaseUrl()).buildUpon();
    if (mResouce != null) {
        builder,appendEncodedPath(mResource);
    }