com.alipay.remoting
Class ProtocolCode

java.lang.Object
  extended by com.alipay.remoting.ProtocolCode

public class ProtocolCode
extends Object

Protocol code definition, you can define your own protocol code in byte array version We suggest to use just one byte for simplicity.


Method Summary
 boolean equals(Object o)
           
static ProtocolCode fromBytes(byte... version)
           
 byte getFirstByte()
          get the first single byte if your protocol code is single code.
 int hashCode()
           
 int length()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

fromBytes

public static ProtocolCode fromBytes(byte... version)

getFirstByte

public byte getFirstByte()
get the first single byte if your protocol code is single code.

Returns:

length

public int length()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.