@ SuppressWarnings ( "rawtypes" ) protected void validateInputStreamData ( Map isd ) throws IllegalStateException { String message = null ; if ( isd != null ) { if ( isd . size ( ) <= 3 ) { boolean type = isd . containsKey ( INPUT_STREAM_CONTENT_TYPE ) ; boolean length = isd . containsKey ( INPUT_STREAM_CONTENT_DATA_LENGTH ) ; boolean data = isd . containsKey ( INPUT_STREAM_CONTENT_DATA ) ; if ( type && length && data ) { // valid. return ; } else { message = "One of required values of InputStreamData is missing. type : " + type + " length : " + length + " data : " + data ; } } else { message = "InputStreamData contains an unrecognized item." ; } } else { message = "InputStreamData is null." ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "validateInputStreamData" , message ) ; throw new IllegalStateException ( message ) ; }
verify the InputStreamData Map object contains required value . throws IllegalStateException if there is any missing values .