Class ProtocolName


  • public final class ProtocolName
    extends java.lang.Object
    RFC 7301 Represents a protocol name for use with ALPN.
    • Method Detail

      • asRawBytes

        public static final ProtocolName asRawBytes​(byte[] bytes)
      • asUtf8Encoding

        public static final ProtocolName asUtf8Encoding​(java.lang.String name)
      • getBytes

        public byte[] getBytes()
      • getUtf8Decoding

        public java.lang.String getUtf8Decoding()
      • encode

        public void encode​(java.io.OutputStream output)
                    throws java.io.IOException
        Encode this ProtocolName to an OutputStream.
        Parameters:
        output - the OutputStream to encode to.
        Throws:
        java.io.IOException
      • parse

        public static ProtocolName parse​(java.io.InputStream input)
                                  throws java.io.IOException
        Parse a ProtocolName from an InputStream.
        Parameters:
        input - the InputStream to parse from.
        Returns:
        a ProtocolName object.
        Throws:
        java.io.IOException
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object