public static byte[] getOpCode(final int opCode) {
        if (opCode < 0x80) {
            return new byte[]{(byte) (opCode & 0xFF)};
        } else if (opCode < 0x4000 || (opCode & 0xFFFC00) == 0x8000) {
            return new byte[]{(byte) (0x80 | ((opCode >> 8) & 0x3F)), (byte) (opCode & 0xFF)};
        } else {
            return new byte[]{(byte) (0xC0 | ((opCode >> 16) & 0x3F)),
                    (byte) ((opCode >> 8) & 0xFF),
                    (byte) (opCode & 0xFF)};
        }
    }
Returns an array of opcodes.
If the MSB = 0 then the length is 1
If the MSB = 1 then the length is 2
If the MSB = 2 then the length is 3

@param opCode operation code
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java