public void setContentLength ( long len ) { if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { //306998.15 logger . logp ( Level . FINE , CLASS_NAME , "setContentLength" , "setContentLength --> " + len ) ; } if ( len < 0 ) { logger . logp ( Level . SEVERE , CLASS_NAME , "setContentLength" , "Illegal.Argument.Invalid.Content.Length" ) ; throw new IllegalArgumentException ( nls . getString ( "Illegal.Argument.Invalid.Content.Length" , "Illegal Argument: Invalid Content Length" ) ) ; } length = len ; if ( Long . MAX_VALUE - total > len ) // PK79219 { limit = total + len ; } }
Sets the content length for this input stream . This should be called once the headers have been read from the input stream .