Beispiel #1
0
 /**
  * Decodes second bit of Payload Type.
  *
  * @param payloadType
  * @return True if payload is authenticated, false otherwise.
  */
 public boolean decodeAuthentication(byte payloadType) {
   return !((payloadType & TypeConverter.intToByte(0x40)) == 0);
 }
Beispiel #2
0
 public static PayloadType decodePayloadType(byte payloadType) throws IllegalArgumentException {
   return PayloadType.parseInt(
       TypeConverter.intToByte(payloadType & TypeConverter.intToByte(0x3f)));
 }
Beispiel #3
0
 /**
  * Decodes first bit of Payload Type.
  *
  * @param payloadType
  * @return True if payload is encrypted, false otherwise.
  */
 private boolean decodeEncryption(byte payloadType) {
   return !((payloadType & TypeConverter.intToByte(0x80)) == 0);
 }