/** * Add a question to the message. * * @param rec * @exception IOException */ public void addQuestion(DNSQuestion rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeQuestion(rec); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _questions.add(rec); _questionsBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an authoritative answer to the message. * * @param rec * @exception IOException */ public void addAuthorativeAnswer(DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _authoritativeAnswers.add(rec); _authoritativeAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add a question to the message. * * @param rec * @exception IOException */ public void addQuestion(DNSQuestion rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeQuestion(rec); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _questions.add(rec); _questionsBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an additional answer to the record. Omit if there is no room. * * @param in * @param rec * @exception IOException */ public void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _additionals.add(rec); _additionalsAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an authoritative answer to the message. * * @param rec * @exception IOException */ public void addAuthorativeAnswer(DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _authoritativeAnswers.add(rec); _authoritativeAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add a question to the message. * * @param rec * @exception IOException */ public void addQuestion(DNSQuestion rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeQuestion(rec); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _questions.add(rec); _questionsBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an additional answer to the record. Omit if there is no room. * * @param in * @param rec * @exception IOException */ public void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _additionals.add(rec); _additionalsAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an authoritative answer to the message. * * @param rec * @exception IOException */ public void addAuthorativeAnswer(DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _authoritativeAnswers.add(rec); _authoritativeAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an additional answer to the record. Omit if there is no room. * * @param in * @param rec * @exception IOException */ public void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _additionals.add(rec); _additionalsAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an additional answer to the record. Omit if there is no room. * * @param in * @param rec * @exception IOException */ public void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); record.close(); if (byteArray.length < this.availableSpace()) { _additionals.add(rec); _additionalsAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an authoritative answer to the message. * * @param rec * @exception IOException */ public void addAuthorativeAnswer(DNSRecord rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, 0); byte[] byteArray = record.toByteArray(); record.close(); if (byteArray.length < this.availableSpace()) { _authoritativeAnswers.add(rec); _authoritativeAnswersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add a question to the message. * * @param rec * @exception IOException */ public void addQuestion(DNSQuestion rec) throws IOException { MessageOutputStream record = new MessageOutputStream(512, this); record.writeQuestion(rec); byte[] byteArray = record.toByteArray(); record.close(); if (byteArray.length < this.availableSpace()) { _questions.add(rec); _questionsBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } }
/** * Add an answer to the message. * * @param rec * @param now * @exception IOException */ public void addAnswer(DNSRecord rec, long now) throws IOException { if (rec != null) { if ((now == 0) || !rec.isExpired(now)) { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, now); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _answers.add(rec); _answersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } } } }
/** * Add an answer to the message. * * @param rec * @param now * @exception IOException */ public void addAnswer(DNSRecord rec, long now) throws IOException { if (rec != null) { if ((now == 0) || !rec.isExpired(now)) { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, now); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _answers.add(rec); _answersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } } } }
/** * Add an answer to the message. * * @param rec * @param now * @exception IOException */ public void addAnswer(DNSRecord rec, long now) throws IOException { if (rec != null) { if ((now == 0) || !rec.isExpired(now)) { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, now); byte[] byteArray = record.toByteArray(); if (byteArray.length < this.availableSpace()) { _answers.add(rec); _answersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } } } }
/** * Add an answer to the message. * * @param rec * @param now * @exception IOException */ public void addAnswer(DNSRecord rec, long now) throws IOException { if (rec != null) { if ((now == 0) || !rec.isExpired(now)) { MessageOutputStream record = new MessageOutputStream(512, this); record.writeRecord(rec, now); byte[] byteArray = record.toByteArray(); record.close(); if (byteArray.length < this.availableSpace()) { _answers.add(rec); _answersBytes.write(byteArray, 0, byteArray.length); } else { throw new IOException("message full"); } } } }