drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java
public InputStream getInputStream() throws IOException {
        if (is != null)
            return is;
        sendRequest();
        String transferEncoding = responseHeader.getFieldValue("Transfer-Encoding"); //$NON-NLS-1$
        String contentLength = responseHeader.getFieldValue("Content-Length"); //$NON-NLS-1$
        if ("chunked".equalsIgnoreCase(transferEncoding)) { //$NON-NLS-1$
            is = new ChunkedInputStream();
        } else if (method.equals("HEAD") && statusCode == HTTP_OK) { //$NON-NLS-1$
            is = new LimitedInputStream(0);
        } else if (contentLength != null) {
            try {
                is = new LimitedInputStream(Integer.parseInt(contentLength));
            } catch (NumberFormatException e) {
                throw new IOException(e.getMessage());
            }
        } else if ((statusCode >= 100 && statusCode < 200) || statusCode == HTTP_NO_CONTENT || statusCode == HTTP_NOT_MODIFIED) {
            is = new LimitedInputStream(0);
        } else {
            closeConnection = true;
            is = socketIn;
        }
        return is;
    }
public InputStream getInputStream() throws IOException {
        if (is != null)
            return is;
        sendRequest();
        String transferEncoding = responseHeader.getFieldValue("Transfer-Encoding"); //$NON-NLS-1$
        String contentLength = responseHeader.getFieldValue("Content-Length"); //$NON-NLS-1$
        if ("chunked".equalsIgnoreCase(transferEncoding)) { //$NON-NLS-1$
            is = new ChunkedInputStream();
        } else if (method.equals("HEAD") && statusCode == HTTP_OK) { //$NON-NLS-1$
            is = new LimitedInputStream(0);
        } else if (contentLength != null) {
            try {
                is = new LimitedInputStream(Integer.parseInt(contentLength));
            } catch (NumberFormatException e) {
                throw new IOException(e.getMessage());
            }
        } else if ((statusCode >= 100 && statusCode < 200) || statusCode == HTTP_NO_CONTENT || statusCode == HTTP_NOT_MODIFIED) {
            is = new LimitedInputStream(0);
        } else {
            closeConnection = true;
            is = socketIn;
        }
        return is;
    }
public InputStream getInputStream ( ) throws IOException { if ( is != null ) return is ; sendRequest ( ) ; String transferEncoding = responseHeader . getFieldValue ( "Transfer-Encoding" ) ; //$NON-NLS-1$ String contentLength = responseHeader . getFieldValue ( "Content-Length" ) ; //$NON-NLS-1$ if ( "chunked" . equalsIgnoreCase ( transferEncoding ) ) { //$NON-NLS-1$ is = new ChunkedInputStream ( ) ; } else if ( method . equals ( "HEAD" ) && statusCode == HTTP_OK ) { //$NON-NLS-1$ is = new LimitedInputStream ( 0 ) ; } else if ( contentLength != null ) { try { is = new LimitedInputStream ( Integer . parseInt ( contentLength ) ) ; } catch ( NumberFormatException e ) { throw new IOException ( e . getMessage ( ) ) ; } } else if ( ( statusCode >= 100 && statusCode < 200 ) || statusCode == HTTP_NO_CONTENT || statusCode == HTTP_NOT_MODIFIED ) { is = new LimitedInputStream ( 0 ) ; } else { closeConnection = true ; is = socketIn ; } return is ; }
Returns this connection's <code>InputStream</code>.

@return this connection's <code>InputStream</code>
@exception IOException if an I/O error occurs while sending the
request
Returns this connection s <code > InputStream< / code > .