List<byte[]> certificates = signatureRecord.getCertificates();
if(certificates.size() > 16) {
throw new NdefEncoderException("Expected number of certificates " + certificates.size() + " <= 15", signatureRecord);
}
CertificateFormat certificateFormat = signatureRecord.getCertificateFormat();
baos.write(((signatureRecord.hasCertificateUri() ? 1 : 0) << 7) | (certificateFormat.getValue() << 4) | (certificates.size() & 0xF));
for(int i = 0; i < certificates.size(); i++) {
byte[] certificate = certificates.get(i);
if(certificate.length > 65535) {