@Override void write(MessageOutputStream out) { out.writeShort(_priority); out.writeShort(_weight); out.writeShort(_port); if (DNSIncoming.USE_DOMAIN_NAME_FORMAT_FOR_SRV_TARGET) { out.writeName(_server); } else { // [PJYF Nov 13 2010] Do we still need this? This looks really bad. All label are supposed to start by a length. out.writeUTF(_server, 0, _server.length()); // add a zero byte to the end just to be safe, this is the strange form // used by the BonjourConformanceTest out.writeByte(0); } }
@Override void write(MessageOutputStream out) { out.writeShort(_priority); out.writeShort(_weight); out.writeShort(_port); if (DNSIncoming.USE_DOMAIN_NAME_FORMAT_FOR_SRV_TARGET) { out.writeName(_server); } else { // [PJYF Nov 13 2010] Do we still need this? This looks really bad. All label are supposed to start by a length. out.writeUTF(_server, 0, _server.length()); // add a zero byte to the end just to be safe, this is the strange form // used by the BonjourConformanceTest out.writeByte(0); } }
@Override void write(MessageOutputStream out) { out.writeShort(_priority); out.writeShort(_weight); out.writeShort(_port); if (DNSIncoming.USE_DOMAIN_NAME_FORMAT_FOR_SRV_TARGET) { out.writeName(_server); } else { // [PJYF Nov 13 2010] Do we still need this? This looks really bad. All label are supposed to start by a length. out.writeUTF(_server, 0, _server.length()); // add a zero byte to the end just to be safe, this is the strange form // used by the BonjourConformanceTest out.writeByte(0); } }
@Override void write(MessageOutputStream out) { out.writeShort(_priority); out.writeShort(_weight); out.writeShort(_port); if (DNSIncoming.USE_DOMAIN_NAME_FORMAT_FOR_SRV_TARGET) { out.writeName(_server); } else { // [PJYF Nov 13 2010] Do we still need this? This looks really bad. All label are supposed to start by a length. out.writeUTF(_server, 0, _server.length()); // add a zero byte to the end just to be safe, this is the strange form // used by the BonjourConformanceTest out.writeByte(0); } }
void writeName(String name) { writeName(name, true); }
void writeName(String name) { writeName(name, true); }
void writeName(String name) { writeName(name, true); }
void writeName(String name) { writeName(name, true); }
@Override void write(MessageOutputStream out) { out.writeName(_alias); }
@Override void write(MessageOutputStream out) { out.writeName(_alias); }
void writeRecord(DNSRecord rec, long now) { writeName(rec.getName()); writeShort(rec.getRecordType().indexValue()); writeShort(rec.getRecordClass().indexValue() | ((rec.isUnique() && _out.isMulticast()) ? DNSRecordClass.CLASS_UNIQUE : 0)); writeInt((now == 0) ? rec.getTTL() : rec.getRemainingTTL(now)); // We need to take into account the 2 size bytes MessageOutputStream record = new MessageOutputStream(512, _out, _offset + this.size() + 2); rec.write(record); byte[] byteArray = record.toByteArray(); writeShort(byteArray.length); write(byteArray, 0, byteArray.length); }
void writeQuestion(DNSQuestion question) { writeName(question.getName()); writeShort(question.getRecordType().indexValue()); writeShort(question.getRecordClass().indexValue()); }
void writeQuestion(DNSQuestion question) { writeName(question.getName()); writeShort(question.getRecordType().indexValue()); writeShort(question.getRecordClass().indexValue()); }
void writeQuestion(DNSQuestion question) { writeName(question.getName()); writeShort(question.getRecordType().indexValue()); writeShort(question.getRecordClass().indexValue()); }
void writeQuestion(DNSQuestion question) { writeName(question.getName()); writeShort(question.getRecordType().indexValue()); writeShort(question.getRecordClass().indexValue()); }
void writeRecord(DNSRecord rec, long now) { writeName(rec.getName()); writeShort(rec.getRecordType().indexValue()); writeShort(rec.getRecordClass().indexValue() | ((rec.isUnique() && _out.isMulticast()) ? DNSRecordClass.CLASS_UNIQUE : 0)); writeInt((now == 0) ? rec.getTTL() : rec.getRemainingTTL(now)); // We need to take into account the 2 size bytes MessageOutputStream record = new MessageOutputStream(512, _out, _offset + this.size() + 2); rec.write(record); byte[] byteArray = record.toByteArray(); writeShort(byteArray.length); write(byteArray, 0, byteArray.length); }
void writeRecord(DNSRecord rec, long now) { writeName(rec.getName()); writeShort(rec.getRecordType().indexValue()); writeShort(rec.getRecordClass().indexValue() | ((rec.isUnique() && _out.isMulticast()) ? DNSRecordClass.CLASS_UNIQUE : 0)); writeInt((now == 0) ? rec.getTTL() : rec.getRemainingTTL(now)); // We need to take into account the 2 size bytes MessageOutputStream record = new MessageOutputStream(512, _out, _offset + this.size() + 2); rec.write(record); byte[] byteArray = record.toByteArray(); writeShort(byteArray.length); write(byteArray, 0, byteArray.length); }
@Override void write(MessageOutputStream out) { out.writeName(_alias); }
@Override void write(MessageOutputStream out) { out.writeName(_alias); }
void writeRecord(DNSRecord rec, long now) { writeName(rec.getName()); writeShort(rec.getRecordType().indexValue()); writeShort(rec.getRecordClass().indexValue() | ((rec.isUnique() && _out.isMulticast()) ? DNSRecordClass.CLASS_UNIQUE : 0)); writeInt((now == 0) ? rec.getTTL() : rec.getRemainingTTL(now)); // We need to take into account the 2 size bytes MessageOutputStream record = new MessageOutputStream(512, _out, _offset + this.size() + 2); rec.write(record); byte[] byteArray = record.toByteArray(); writeShort(byteArray.length); write(byteArray, 0, byteArray.length); }