/** * Return the first value for the named MIME type parameter. * * @param name * The parameter name (case sensitive). * @param def * The default value (optional). * * @return The value for that parameter and the caller's default value * otherwise. */ public String getParam(final String name, final String def) { if (name == null) throw new IllegalArgumentException(); for (NV nv : params) { if (name.equals(nv.getName())) { return nv.getValue(); } } return def; }
resp.setHeader(nv.getName(), nv.getValue());
resp.setHeader(nv.getName(), nv.getValue());
resp.setHeader(nv.getName(), nv.getValue());
resp.setHeader(nv.getName(), nv.getValue());
return nv.getValue();
return nv.getValue();
sb.append(encode(nv.getValue()));
sb.append(encode(nv.getValue()));
properties.put(a[i][j].getName(),a[i][j].getValue());
/** * Return a {@link Properties} object that inherits defaults from * <i>properties</i> and sets/overrides properties identified in <i>entries</i>. * * @param properties * The inherited properties (this object is NOT modified). * @param params * The overriden properties. * * @return A new {@link Properties}. */ protected static Condition getCondition(Map<String,String>properties, NV[] params) throws IOException { properties = new HashMap<String,String>(properties); for(int i=0; i<params.length; i++) { properties.put(params[i].getName(),params[i].getValue()); } return new Condition(properties); }
properties.put(a[i].getName(),a[i].getValue());