Class Headers

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Headers.Header  
    • Constructor Summary

      Constructors 
      Constructor Description
      Headers()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, byte[] value)
      Adds binary header.
      void add​(java.lang.String key, java.lang.String value)
      Adds text header.
      void copyFrom​(Headers other)  
      boolean isEmpty()  
      java.util.Iterator<Headers.Header> iterator()  
      void resetState()
      resets pooled object state so it can be reused
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Headers

        public Headers()
    • Method Detail

      • add

        public void add​(@Nullable
                        java.lang.String key,
                        @Nullable
                        java.lang.String value)
        Adds text header.
        Parameters:
        key - header key, will be ignored if null
        value - header value, can be null
      • add

        public void add​(@Nullable
                        java.lang.String key,
                        @Nullable
                        byte[] value)
        Adds binary header.
        Parameters:
        key - header key, will be ignored if null
        value - header value, can be null
      • resetState

        public void resetState()
        Description copied from interface: Recyclable
        resets pooled object state so it can be reused
        Specified by:
        resetState in interface Recyclable
      • size

        public int size()
      • isEmpty

        public boolean isEmpty()
      • copyFrom

        public void copyFrom​(Headers other)