final void parseAccessLayerPDU(@NonNull final AccessMessage message) {
        //MSB of the first octet defines the length of opcodes.
        //if MSB = 0 length is 1 and so forth
        final byte[] accessPayload = message.getAccessPdu();
        final int opCodeLength = getOpCodeLength(accessPayload[0] & 0xFF);
        message.setOpCode(getOpCode(accessPayload, opCodeLength));
        if(opCodeLength == 3) {
            message.setCompanyIdentifier(unsignedByteToInt(accessPayload[2]) << 8 | unsignedByteToInt(accessPayload[1]));
        }
        final int length = accessPayload.length - opCodeLength;
        final ByteBuffer paramsBuffer = ByteBuffer.allocate(length).order(ByteOrder.BIG_ENDIAN);
        paramsBuffer.put(accessPayload, opCodeLength, length);
        message.setParameters(paramsBuffer.array());
        MeshLogger.verbose(TAG, "Received Access PDU " + bytesToHex(accessPayload, false));
    }
Parse access pdu

@param message underlying message containing the access pdu
mesh/src/main/java/no/nordicsemi/android/mesh/transport/AccessLayer.java