/** * Parsing ctor * @param context How we lookup references * @param key The name of the variable that this was transfered as * @param type The type information from javascript * @param value The javascript variable converted to a string */ public InboundVariable(InboundContext context, String key, String type, String value) { this(context, key, type, new FormField(value)); }
/** * Parsing ctor * @param context How we lookup references * @param key The name of the variable that this was transfered as * @param type The type information from javascript * @param value The javascript variable converted to a string * @param has the data already been URL decoded? */ public InboundVariable(InboundContext context, String key, String type, String value, boolean urlDecoded) { this(context, key, type, new FormField(value), urlDecoded); }
/** * Sort out a single line in a POST request * @param line The line to parse * @param paramMap The map to add parsed parameters to */ private static void parsePostLine(String line, Map<String, FormField> paramMap) { if (line.length() == 0) { return; } int sep = line.indexOf(ProtocolConstants.INBOUND_DECL_SEPARATOR); if (sep == -1) { paramMap.put(line, null); } else { String key = line.substring(0, sep); String value = line.substring(sep + ProtocolConstants.INBOUND_DECL_SEPARATOR.length()); paramMap.put(key, new FormField(value)); } }
convertedMap.put(key, new FormField(array[0]));
paramMap.put(name, new FormField(req.getParameter(name)));