Code example for InputStreamEntity

Methods: setContentType

0
 
        public HttpUriRequest createRequest(URI uri) {
            HttpPost post = new HttpPost(uri);
            post.addHeader(X_HTTP_METHOD_OVERRIDE, "PUT");
            // mMediaInputStream.reset(); 
            InputStreamEntity entity = new InputStreamEntity(mMediaInputStream,
                    -1 /* read until EOF */); 
            entity.setContentType(mContentType);
            post.setEntity(entity);
            return post;
        } 
    } 
 
    
    /** 
     * Creates a new AndroidGDataClient. 
     *  
     * @param context The ContentResolver to get URL rewriting rules from 
     * through the Android proxy server, using null to indicate not using proxy. 
     * The context will also be used by GoogleHttpClient for configuration of  
Connect your IDE to all the code out there  Get Codota for Java