public OutputStream getOutputStream() throws IOException {
        if (os != null)
            return os;
        String contentLength = requestHeader.getFieldValue("Content-Length"); //$NON-NLS-1$
        if (sendChunked && httpVersion > 1.0) {
            os = new ChunkedOutputStream();
        } else if (contentLength != null) {
            try {
                os = new LimitedOutputStream(Integer.parseInt(contentLength));
            } catch (NumberFormatException e) {
                throw new IOException(Policy.bind("exception.malformedContentLength")); //$NON-NLS-1$
            }
        } else {
            os = new CachedOutputStream();
            return os;
        }
        sendRequest();
        return os;
    }
public OutputStream getOutputStream() throws IOException {
        if (os != null)
            return os;
        String contentLength = requestHeader.getFieldValue("Content-Length"); 
        if (sendChunked && httpVersion > 1.0) {
            os = new ChunkedOutputStream();
        } else if (contentLength != null) {
            try {
                os = new LimitedOutputStream(Integer.parseInt(contentLength));
            } catch (NumberFormatException e) {
                throw new IOException(Policy.bind("exception.malformedContentLength")); 
            }
        } else {
            os = new CachedOutputStream();
            return os;
        }
        sendRequest();
        return os;
    }
public OutputStream getOutputStream ( ) throws IOException { if ( os != null ) return os ; String contentLength = requestHeader . getFieldValue ( "Content-Length" ) ; //$NON-NLS-1$ if ( sendChunked && httpVersion > 1.0 ) { os = new ChunkedOutputStream ( ) ; } else if ( contentLength != null ) { try { os = new LimitedOutputStream ( Integer . parseInt ( contentLength ) ) ; } catch ( NumberFormatException e ) { throw new IOException ( Policy . bind ( "exception.malformedContentLength" ) ) ; //$NON-NLS-1$ } } else { os = new CachedOutputStream ( ) ; return os ; } sendRequest ( ) ; return os ; }
Returns this connection's <code>OutputStream</code>.

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