public ServletOutputStream getOutputStream ( ) { final boolean isTraceOn = com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && logger . isLoggable ( Level . FINE ) ) //306998.15 logger . entering ( CLASS_NAME , "getOutputStream" , "gotWriter=" + String . valueOf ( _gotWriter ) + " [" + this + "]" ) ; if ( ! _ignoreStateErrors && _gotWriter ) { if ( isTraceOn && logger . isLoggable ( Level . FINE ) ) //306998.15 logger . exiting ( CLASS_NAME , "getOutputStream" , "throw IllegalStateException" ) ; throw new IllegalStateException ( nls . getString ( "Writer.already.obtained" , "Writer already obtained" ) ) ; } //PK89810 Start if ( ! ( WCCustomProperties . FINISH_RESPONSE_ON_CLOSE ) || ! _gotOutputStream ) { _gotOutputStream = true ; // LIBERTY _bufferedOut.init(_rawOut, getBufferSize()); // LIBERTY _bufferedOut.setLimit(_contentLength); // LIBERTY _bufferedOut.setResponse(_response); // LIBERTY _responseBuffer = _bufferedOut; } //PK89810 End this . fireOutputStreamRetrievedEvent ( _bufferedOut ) ; if ( isTraceOn && logger . isLoggable ( Level . FINE ) ) //306998.15 logger . exiting ( CLASS_NAME , "getOutputStream" ) ; return _bufferedOut ; }
Returns an output stream for writing binary response data .