public long getContentLength() {

        // Get the declared content length.
        long contentLength = context.getContentLength();

        // If it is defined send the answer.
        if (contentLength != -1)
            return contentLength;

        // Certain messages are defined as having zero length
        // message bodies.
        int statusCode = getStatusCode();
        if (statusCode == IResponse.SC_NO_CONTENT || statusCode == IResponse.SC_NOT_MODIFIED || statusCode >= 100 && statusCode < 200)
            return 0;

        // We don't know how long the body is.
        return -1;
    }
public long getContentLength() {

        
        long contentLength = context.getContentLength();

        
        if (contentLength != -1)
            return contentLength;

        
        
        int statusCode = getStatusCode();
        if (statusCode == IResponse.SC_NO_CONTENT || statusCode == IResponse.SC_NOT_MODIFIED || statusCode >= 100 && statusCode < 200)
            return 0;

        
        return -1;
    }
public long getContentLength ( ) { // Get the declared content length. long contentLength = context . getContentLength ( ) ; // If it is defined send the answer. if ( contentLength != - 1 ) return contentLength ; // Certain messages are defined as having zero length // message bodies. int statusCode = getStatusCode ( ) ; if ( statusCode == IResponse . SC_NO_CONTENT || statusCode == IResponse . SC_NOT_MODIFIED || statusCode >= 100 && statusCode < 200 ) return 0 ; // We don't know how long the body is. 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 .