/** * Formats an array of header elements. * * @param elems the header elements to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted header elements */ public final static String formatElements(final HeaderElement[] elems, final boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatElements(null, elems, quote).toString(); }
/** * Formats a header element. * * @param elem the header element to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted header element */ public final static String formatHeaderElement(final HeaderElement elem, boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatHeaderElement(null, elem, quote).toString(); }
/** * Formats a name-value pair. * * @param nvp the name-value pair to format * @param quote <code>true</code> to always format with a quoted value, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted name-value pair */ public final static String formatNameValuePair(final NameValuePair nvp, final boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatNameValuePair(null, nvp, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted parameters */ public final static String formatParameters(final NameValuePair[] nvps, final boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatParameters(null, nvps, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted parameters */ public static String formatParameters(final NameValuePair[] nvps, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatParameters(null, nvps, quote).toString(); }
/** * Formats an array of header elements. * * @param elems the header elements to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted header elements */ public static String formatElements(final HeaderElement[] elems, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatElements(null, elems, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted parameters */ public static String formatParameters(final NameValuePair[] nvps, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatParameters(null, nvps, quote).toString(); }
/** * Formats a name-value pair. * * @param nvp the name-value pair to format * @param quote <code>true</code> to always format with a quoted value, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #INSTANCE default} * * @return the formatted name-value pair */ public static String formatNameValuePair(final NameValuePair nvp, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatterHC4.INSTANCE) .formatNameValuePair(null, nvp, quote).toString(); }
/** * Formats a header element. * * @param elem the header element to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted header element */ public static String formatHeaderElement(final HeaderElement elem, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatHeaderElement(null, elem, quote).toString(); }
/** * Formats an array of header elements. * * @param elems the header elements to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #INSTANCE default} * * @return the formatted header elements */ public static String formatElements(final HeaderElement[] elems, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatterHC4.INSTANCE) .formatElements(null, elems, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted parameters */ public static String formatParameters(final NameValuePair[] nvps, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatParameters(null, nvps, quote).toString(); }
/** * Formats a name-value pair. * * @param nvp the name-value pair to format * @param quote {@code true} to always format with a quoted value, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted name-value pair */ public static String formatNameValuePair(final NameValuePair nvp, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatNameValuePair(null, nvp, quote).toString(); }
/** * Formats a header element. * * @param elem the header element to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #INSTANCE default} * * @return the formatted header element */ public static String formatHeaderElement(final HeaderElement elem, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatterHC4.INSTANCE) .formatHeaderElement(null, elem, quote).toString(); }
/** * Formats an array of header elements. * * @param elems the header elements to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #INSTANCE default} * * @return the formatted header elements */ public static String formatElements(final HeaderElement[] elems, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatElements(null, elems, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted parameters */ public final static String formatParameters(final NameValuePair[] nvps, final boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatParameters(null, nvps, quote).toString(); }
/** * Formats a name-value pair. * * @param nvp the name-value pair to format * @param quote {@code true} to always format with a quoted value, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted name-value pair */ public static String formatNameValuePair(final NameValuePair nvp, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatNameValuePair(null, nvp, quote).toString(); }
/** * Formats a header element. * * @param elem the header element to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #DEFAULT default} * * @return the formatted header element */ public final static String formatHeaderElement(final HeaderElement elem, boolean quote, HeaderValueFormatter formatter) { if (formatter == null) formatter = BasicHeaderValueFormatter.DEFAULT; return formatter.formatHeaderElement(null, elem, quote).toString(); }
/** * Formats an array of header elements. * * @param elems the header elements to format * @param quote {@code true} to always format with quoted values, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted header elements */ public static String formatElements(final HeaderElement[] elems, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatElements(null, elems, quote).toString(); }
/** * Formats a set of parameters. * * @param nvps the parameters to format * @param quote <code>true</code> to always format with quoted values, * <code>false</code> to use quotes only when necessary * @param formatter the formatter to use, or <code>null</code> * for the {@link #INSTANCE default} * * @return the formatted parameters */ public static String formatParameters(final NameValuePair[] nvps, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatterHC4.INSTANCE) .formatParameters(null, nvps, quote).toString(); }
/** * Formats a name-value pair. * * @param nvp the name-value pair to format * @param quote {@code true} to always format with a quoted value, * {@code false} to use quotes only when necessary * @param formatter the formatter to use, or {@code null} * for the {@link #INSTANCE default} * * @return the formatted name-value pair */ public static String formatNameValuePair(final NameValuePair nvp, final boolean quote, final HeaderValueFormatter formatter) { return (formatter != null ? formatter : BasicHeaderValueFormatter.INSTANCE) .formatNameValuePair(null, nvp, quote).toString(); }