public long getContentLength() {
        long contentLength = context.getContentLength();
        if (contentLength != -1)
            return contentLength;
        if (is instanceof ByteArrayInputStream)
            return ((ByteArrayInputStream) is).available();
        return -1;
    }
public long getContentLength() {
        long contentLength = context.getContentLength();
        if (contentLength != -1)
            return contentLength;
        if (is instanceof ByteArrayInputStream)
            return ((ByteArrayInputStream) is).available();
        return -1;
    }
public long getContentLength ( ) { long contentLength = context . getContentLength ( ) ; if ( contentLength != - 1 ) return contentLength ; if ( is instanceof ByteArrayInputStream ) return ( ( ByteArrayInputStream ) is ) . available ( ) ; return - 1 ; }
Returns the content length of this message's body, or -1 if the
content length is unknown.

@return the content length of this message's body
Returns the content length of this message s body or - 1 if the content length is unknown .