Examples of toWire()


Examples of com.bitsofproof.supernode.api.Transaction.toWire()

      oneIn.add (copy.getInputs ().get (inr));
      copy.setInputs (oneIn);
    }

    WireFormat.Writer writer = new WireFormat.Writer ();
    copy.toWire (writer);

    byte[] txwire = writer.toByteArray ();
    byte[] hash = null;
    try
    {
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

        if (tsig != null) {
          tsig.applyStream(response, qtsig, first);
          qtsig = response.getTSIG();
        }
        first = false;
        byte[] out = response.toWire();
        dataOut.writeShort(out.length);
        dataOut.write(out);
      }
    } catch (IOException ex) {
      log.warn("AXFR failed", ex);
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

      OPTRecord opt = new OPTRecord((short) 4096, rcode, (byte) 0, optflags);
      response.addRecord(opt, Section.ADDITIONAL);
    }

    response.setTSIG(tsig, Rcode.NOERROR, queryTSIG);
    return response.toWire(maxLength);
  }

  private byte[] buildErrorMessage(Header header, int rcode, Record question) {
    Message response = new Message();
    response.setHeader(header);
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

    }
    if (rcode == Rcode.SERVFAIL) {
      response.addRecord(question, Section.QUESTION);
    }
    header.setRcode(rcode);
    return response.toWire();
  }

  byte[] formerrMessage(byte[] in) {
    Header header;
    try {
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

            OPTRecord opt = new OPTRecord((short) 4096, rcode, (byte) 0,
                    optflags);
            response.addRecord(opt, Section.ADDITIONAL);
        }

        return response.toWire(maxLength);
    }

    byte[] buildErrorMessage(Header header, int rcode, Record question) {
        Message response = new Message();
        response.setHeader(header);
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

        for (int i = 0; i < 4; i++)
            response.removeAllRecords(i);
        if (rcode == Rcode.SERVFAIL)
            response.addRecord(question, Section.QUESTION);
        header.setRcode(rcode);
        return response.toWire();
    }

    public byte[] formerrMessage(byte[] in) {
        Header header;
        try {
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

            OPTRecord opt = new OPTRecord((short) 4096, rcode, (byte) 0,
                    optflags);
            response.addRecord(opt, Section.ADDITIONAL);
        }

        return response.toWire(maxLength);
    }

    byte[] buildErrorMessage(Header header, int rcode, Record question) {
        Message response = new Message();
        response.setHeader(header);
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

        for (int i = 0; i < 4; i++)
            response.removeAllRecords(i);
        if (rcode == Rcode.SERVFAIL)
            response.addRecord(question, Section.QUESTION);
        header.setRcode(rcode);
        return response.toWire();
    }

    public byte[] formerrMessage(byte[] in) {
        Header header;
        try {
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

        for (String rec : recs) {
            msg.addRecord(getRecord(rec), Section.QUESTION);
        }

        try {
            final byte[] ba1 = msg.toWire();
            os.write(Integer.toString(ba1.length * 2).getBytes("cp866"));
            os.write('\n');
            os.write(JOrphanUtils.baToHexBytes(ba1));
            os.write('\n');
        } catch (IOException ex) {
View Full Code Here

Examples of org.xbill.DNS.Message.toWire()

            os.write('\n');
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }

        return ByteBuffer.wrap(msg.toWire());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.