Class Headers.Builder

  • Enclosing class:
    Headers

    public static final class Headers.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • add

        public Headers.Builder add​(String line)
        Add an header line containing a field name, a literal colon, and a value.
      • set

        public Headers.Builder set​(String name,
                                   String value)
        Set a field with the specified value. If the field is not found, it is added. If the field is found, the existing values are replaced.
      • get

        public String get​(String name)
        Equivalent to build().get(name), but potentially faster.