void setWriter(Writer writer) {
    	// PM12137 - starts
    	if (closed) {
    		if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.FINE)){
                logger.logp(Level.FINE, CLASS_NAME, "setWriter", "resetting closed to false for this=["+this+"]");
            }
    		closed = false;
    		strBuffer = new StringBuffer(this.bodyContentBuffSize);
    	}
    	// PM12137 - ends
	    this.writer = writer;
	    if (writer != null) {
	        // According to the spec, the JspWriter returned by
	        // JspContext.pushBody(java.io.Writer writer) must behave as
	        // though it were unbuffered. This means that its getBufferSize()
	        // must always return 0. The implementation of
	        // JspWriter.getBufferSize() returns the value of JspWriter's
	        // 'bufferSize' field, which is inherited by this class.
	        // Therefore, we simply save the current 'bufferSize' (so we can
	        // later restore it should this BodyContentImpl ever be reused by
	        // a call to PageContext.pushBody()) before setting it to 0.
	        if (bufferSize != 0) {
	            if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.FINE)){
	                logger.logp(Level.FINE, CLASS_NAME, "setWriter", "BodyContentImpl setWriter A. bufferSize=["+bufferSize+"]  this=["+this+"]");
	            }
	            bufferSizeSave = bufferSize;
	            bufferSize = 0;
	        }
	    } else {
	        bufferSize = bufferSizeSave;
	        if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.FINE)){
	            logger.logp(Level.FINE, CLASS_NAME, "setWriter", "BodyContentImpl setWriter B. bufferSize=["+bufferSize+"]  this=["+this+"]");
	        }
	        clearBody();
	    }
    }
void setWriter ( Writer writer ) { if ( closed ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setWriter" , "resetting closed to false for this=[" + this + "]" ) ; } closed = false ; strBuffer = new StringBuffer ( this . bodyContentBuffSize ) ; } this . writer = writer ; if ( writer != null ) { if ( bufferSize != 0 ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setWriter" , "BodyContentImpl setWriter A. bufferSize=[" + bufferSize + "]  this=[" + this + "]" ) ; } bufferSizeSave = bufferSize ; bufferSize = 0 ; } } else { bufferSize = bufferSizeSave ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setWriter" , "BodyContentImpl setWriter B. bufferSize=[" + bufferSize + "]  this=[" + this + "]" ) ; } clearBody ( ) ; } }
Sets the writer to which all output is written.