private HashMap deserializePostParam ( IExtendedRequest req , byte [ ] cookieValueBytes , String reqURL ) throws IOException , UnsupportedEncodingException , IllegalStateException { HashMap output = null ; List < byte [ ] > data = splitBytes ( cookieValueBytes , ( byte ) ' ' ) ; int total = data . size ( ) ; if ( total > OFFSET_DATA ) { // url and at least one data. now deserializing the url. String url = new String ( Base64Coder . base64Decode ( data . get ( OFFSET_REQURL ) ) , "UTF-8" ) ; if ( url != null && url . equals ( reqURL ) ) { byte [ ] [ ] bytes = new byte [ total - OFFSET_DATA ] [ ] ; for ( int i = 0 ; i < ( total - OFFSET_DATA ) ; i ++ ) { bytes [ i ] = Base64Coder . base64Decode ( data . get ( OFFSET_DATA + i ) ) ; } output = req . deserializeInputStreamData ( bytes ) ; } else { throw new IllegalStateException ( "The url in the post param cookie does not match the requested url" ) ; } } else { throw new IllegalStateException ( "The data of the post param cookie is too short. The data might be truncated." ) ; } return output ; }
deserialize Post parameters . The code doesn t expect that the req cookieValueBytes or reqURL is null .