/** * Shortcut for calling <code>split(s, <js>','</js>)</code> * * @param s The string to split. Can be <jk>null</jk>. * @return The tokens, or <jk>null</jk> if the string was null. */ public static String[] split(String s) { return split(s, ','); }
/** * Shortcut for calling <code>split(s, <js>','</js>)</code> * * @param s The string to split. Can be <jk>null</jk>. * @return The tokens, or <jk>null</jk> if the string was null. */ public static String[] split(String s) { return split(s, ','); }
/** * Shortcut for calling <code>split(s, <js>','</js>)</code> * * @param s The string to split. Can be <jk>null</jk>. * @return The tokens, or <jk>null</jk> if the string was null. */ public static String[] split(String s) { return split(s, ','); }
/** * Constructor. * * @param value The raw header value. */ protected HeaderStringArray(String value) { this.value = StringUtils.split(value); }
/** * Constructor. * * @param value The raw header value. */ protected HeaderStringArray(String value) { this.value = StringUtils.split(value); }
/** * Constructor. * * @param value The raw header value. */ protected HeaderStringArray(String value) { this.value = StringUtils.split(value); }
/** * Constructor. * * @param value The raw header value. */ protected HeaderEntityValidatorArray(String value) { String[] s = StringUtils.split(value); this.value = new EntityValidator[s.length]; for (int i = 0; i < s.length; i++) { this.value[i] = new EntityValidator(s[i]); } }
private static String[] getDefaultProtocols() { String sp = System.getProperty("transport.client.protocol"); if (isEmpty(sp)) return new String[] {"SSL_TLS","TLS","SSL"}; return StringUtils.split(sp, ','); } }
/** * Constructor. * * @param value The raw header value. */ protected HeaderEntityValidatorArray(String value) { String[] s = StringUtils.split(value); this.value = new EntityValidator[s.length]; for (int i = 0; i < s.length; i++) { this.value[i] = new EntityValidator(s[i]); } }
/** * Same as {@link #subset(String...)} but allows you to specify header names as a comma-delimited list. * * @param headers The headers to include in the copy. * @return A new headers object. */ public RequestHeaders subset(String headers) { return subset(split(headers)); }
private static String[] getDefaultProtocols() { String sp = System.getProperty("transport.client.protocol"); if (isEmpty(sp)) return new String[] {"SSL_TLS","TLS","SSL"}; return StringUtils.split(sp, ','); } }
private static String[] getDefaultProtocols() { String sp = System.getProperty("transport.client.protocol"); if (isEmpty(sp)) return new String[] {"SSL_TLS","TLS","SSL"}; return StringUtils.split(sp, ','); } }
@Override /* Var */ public String resolve(VarResolverSession session, String s) { String[] s2 = s.indexOf(',') == -1 ? new String[]{s.trim()} : split(s); return resolve(session, s2); } }
@Override /* Var */ public String resolve(VarResolverSession session, String s) { String[] s2 = s.indexOf(',') == -1 ? new String[]{s.trim()} : split(s); return resolve(session, s2); } }
@Override /* Var */ public String resolve(VarResolverSession session, String s) { String[] s2 = s.indexOf(',') == -1 ? new String[]{s.trim()} : split(s); return resolve(session, s2); } }
/** * Constructor. * * @param value The raw header value. */ protected HeaderEntityValidatorArray(String value) { String[] s = StringUtils.split(value); this.value = new EntityValidator[s.length]; for (int i = 0; i < s.length; i++) { this.value[i] = new EntityValidator(s[i]); } }
/** * Same as {@link #subset(String...)} but allows you to specify header names as a comma-delimited list. * * @param headers The headers to include in the copy. * @return A new headers object. */ public RequestHeaders subset(String headers) { return subset(split(headers)); }
@Override /* Var*/ public String doResolve(VarResolverSession session, String s) throws Exception { int i = s.indexOf(','); if (i == -1) return resolve(session, s.trim()); String[] s2 = split(s); String v = resolve(session, s2[0]); if (v == null) v = s2[1]; return v; } }
@Override /* Var*/ public String doResolve(VarResolverSession session, String s) throws Exception { int i = s.indexOf(','); if (i == -1) return resolve(session, s.trim()); for (String s2 : split(s)) { String v = resolve(session, s2); if (v != null) return v; } return null; } }
@Override /* Var*/ public String doResolve(VarResolverSession session, String s) throws Exception { int i = s.indexOf(','); if (i == -1) return resolve(session, s.trim()); String[] s2 = split(s); String v = resolve(session, s2[0]); if (v == null) v = s2[1]; return v; } }