Code example for HttpHost

0
            Cursor mCursor = context.getContentResolver().query(uri, null, null, null, null);
            if (mCursor != null && mCursor.moveToFirst()) {
                // 游标移至第一条记录,当然也只有一条 
                String proxyStr = mCursor.getString(mCursor.getColumnIndex("proxy"));
                if (proxyStr != null && proxyStr.trim().length() > 0) {
                    HttpHost proxy = new HttpHost(proxyStr, 80);
                    client.getParams().setParameter(ConnRouteParams.DEFAULT_PROXY, proxy);
                } 
                mCursor.close();
            } 
        } 
        return client;
    } 
 
    /** 
     * Upload image into output stream . 
     *  
     * @param out 
     *            : output stream for uploading weibo 
     * @param imgpath 
Connect your IDE to all the code out there  Get Codota for Java