code: private String serializePostParam(IExtendedRequest req, String reqURL, boolean keepInput) throws IOException, UnsupportedEncodingException, IllegalStateException {
  		String output = null;
  		HashMap params = req.getInputStreamData();
  		if (params != null) {
  			long size = req.sizeInputStreamData(params);
  			byte[] reqURLBytes = reqURL.getBytes("UTF-8");
  			long total = size + reqURLBytes.length + LENGTH_INT;
  
  			long postParamSaveSize = webAppSecurityConfig.getPostParamCookieSize();
  			if (tc.isDebugEnabled()) {
  				Tr.debug(tc, "length:" + total + "  maximum length:" + postParamSaveSize);
  			}
  
  			if (total < postParamSaveSize) { // give up to enocde if the data is too large (>16K)
  				byte[][] data = req.serializeInputStreamData(params);
  				StringBuffer sb = new StringBuffer();
  				sb.append(StringUtil.toString(Base64Coder.base64Encode(reqURLBytes)));
  				for (int i = 0; i < data.length; i++) {
  					sb.append(".").append(StringUtil.toString(Base64Coder.base64Encode(data[i])));
  				}
  				output = sb.toString();
  				if (tc.isDebugEnabled()) {
  					Tr.debug(tc, "encoded length:" + output.length());
  				}
  			    if (keepInput) {
  			        // push back the data.
  					req.setInputStreamData(params);
  			    }
  			} else {
  				Tr.warning(tc, "SEC_FORM_POST_NULL_OR_TOO_LARGE");
  			}
  			if (tc.isDebugEnabled()) {
  				Tr.debug(tc, "encoded POST parameters: " + output);
  			}
        
  		} else {
  			Tr.warning(tc, "SEC_FORM_POST_NULL_OR_TOO_LARGE");
  		}
  		return output;
  	}
docs: serialize Post parameters.
  The code doesn't expect that the req or reqURL is null.
  The format of the data is as follows:
  <base64 encoded byte array of the request URL>.<based64 encoded data[0] from serializeInputStreamData()>.<base 64 encoded data[1]>. and so on.