HttpEntity isRepeatable - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for HttpEntity isRepeatable method.

This code example shows how to use the following methods:isRepeatable
 
	/* (non-Javadoc) 
	 * @see org.apache.commons.httpclient.methods.RequestEntity#isRepeatable() 
	 */ 
	public boolean isRepeatable() { 
		return entity.isRepeatable();
	} 
 
	/* (non-Javadoc) 
	 * @see org.apache.commons.httpclient.methods.RequestEntity#writeRequest(java.io.OutputStream) 
	 * 
	public void writeRequest(OutputStream stream) throws IOException { 
		((RequestEntityWrapper) entity).writeRequest(new OutputStreamWrapper(stream, callback)); 
		 
	} */ 
 
	/* (non-Javadoc) 
	 * @see org.apache.http.HttpEntity#consumeContent() 
	 */ 
	@SuppressWarnings("deprecation") 
6
CodeRank
This code example shows how to use the following methods:getClass, isRepeatable
            request.setEntity(proxy);
        } 
    } 
 
    static boolean isEnhanced(final HttpEntity entity) {
        if (entity != null && Proxy.isProxyClass(entity.getClass())) {
            final InvocationHandler handler = Proxy.getInvocationHandler(entity);
            return handler instanceof RequestEntityExecHandler;
        } else { 
            return false; 
        } 
    } 
 
    static boolean isRepeatable(final HttpRequest request) {
        if (request instanceof HttpEntityEnclosingRequest) {
            final HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
            if (entity != null) {
                if (isEnhanced(entity)) {
                    final RequestEntityExecHandler handler = (RequestEntityExecHandler)
                            Proxy.getInvocationHandler(entity);

4
CodeRank
This code example shows how to use the following methods:isRepeatable
            close(); 
        } 
    } 
 
    public boolean isRepeatable() { 
        return this.entity.isRepeatable();
    } 
 
    public void close() throws IOException { 
        final ReadableByteChannel local = this.channel;
        this.channel = null;
        if (local != null) {
            local.close();
        } 
        if (this.entity.isStreaming()) {
            final InputStream instream = this.entity.getContent();
            instream.close();
        } 
    } 
 
4
CodeRank
isRepeatable Method Overview
Tells if the entity is capable to produce its data more than once.
See Code Examples for other Android HttpEntity Methods: