Examples of data()


Examples of io.netty.handler.codec.http.FullHttpResponse.data()

            buf.append("</a></li>\r\n");
        }

        buf.append("</ul></body></html>\r\n");

        response.data().writeBytes(Unpooled.copiedBuffer(buf, CharsetUtil.UTF_8));

        // Close the connection as soon as the error message is sent.
        ctx.write(response).addListener(ChannelFutureListener.CLOSE);
    }
View Full Code Here

Examples of io.netty.handler.codec.http.HttpContent.data()

            HttpHeaders.setTransferEncodingChunked(request);
            request.data().clear();
        } else {
            // get the only one body and set it to the request
            HttpContent chunk = nextChunk();
            request.data().clear().writeBytes(chunk.data());
        }
        return request;
    }

    /**
 
View Full Code Here

Examples of javax.jmdns.impl.DNSOutgoing.data()

    public void testCreateQuery() throws IOException {
        String serviceName = "_00000000-0b44-f234-48c8-071c565644b3._sub._home-sharing._tcp.local.";
        DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
        assertNotNull("Could not create the outgoing message", out);
        out.addQuestion(DNSQuestion.newQuestion(serviceName, DNSRecordType.TYPE_ANY, DNSRecordClass.CLASS_IN, true));
        byte[] data = out.data();
        assertNotNull("Could not encode the outgoing message", data);
        byte[] expected = new byte[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x25, 0x5f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x2d, 0x30, 0x62, 0x34, 0x34, 0x2d, 0x66, 0x32, 0x33, 0x34, 0x2d, 0x34, 0x38, 0x63, 0x38,
                0x2d, 0x30, 0x37, 0x31, 0x63, 0x35, 0x36, 0x35, 0x36, 0x34, 0x34, 0x62, 0x33, 0x4, 0x5f, 0x73, 0x75, 0x62, 0xd, 0x5f, 0x68, 0x6f, 0x6d, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4, 0x5f, 0x74, 0x63, 0x70, 0x5, 0x6c,
                0x6f, 0x63, 0x61, 0x6c, 0x0, 0x0, (byte) 0xff, 0x0, 0x1 };
        for (int i = 0; i < data.length; i++) {
View Full Code Here

Examples of javax.jmdns.impl.DNSOutgoing.data()

        assertNotNull("Could not create the outgoing message", out);
        out.addQuestion(DNSQuestion.newQuestion(serviceName, DNSRecordType.TYPE_ANY, DNSRecordClass.CLASS_IN, true));
        long now = (new Date()).getTime();
        out.addAnswer(new DNSRecord.Pointer(serviceType, DNSRecordClass.CLASS_IN, true, DNSConstants.DNS_TTL, serviceName), now);
        out.addAuthorativeAnswer(new DNSRecord.Service(serviceType, DNSRecordClass.CLASS_IN, true, DNSConstants.DNS_TTL, 1, 20, 8080, "panoramix.local."));
        byte[] data = out.data();
        assertNotNull("Could not encode the outgoing message", data);
        // byte[] expected = new byte[] { 0x0, 0x0, (byte) 0x84, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x6, 0x50, 0x69, 0x65, 0x72, 0x72, 0x65, 0xd, 0x5f, 0x68, 0x6f, 0x6d, 0x65, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4, 0x5f, 0x74,
        // 0x63, 0x70, 0x5, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x0, 0x0, (byte) 0xff, 0x0, 0x1, (byte) 0xc0, 0x13, 0x0, 0xc, 0x0, 0x1, 0x0, 0x0, 0xe, 0xf, 0x0, 0x21, 0x6, 0x50, 0x69, 0x65, 0x72, 0x72, 0x65, 0xd, 0x5f, 0x68, 0x6f, 0x6d, 0x65, 0x2d,
        // 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x4, 0x5f, 0x74, 0x63, 0x70, 0x5, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x0, (byte) 0xc0, 0x13, 0x0, 0x21, 0x0, 0x1, 0x0, 0x0, 0xe, 0xf, 0x0, 0x17, 0x0, 0x1, 0x0, 0x14, 0x1f, (byte) 0x90, 0x9, 0x70,
        // 0x61, 0x6e, 0x6f, 0x72, 0x61, 0x6d, 0x69, 0x78, 0x5, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x0 };
View Full Code Here

Examples of mireka.filter.misc.StopLoop.data()

            IOException {
        StopLoop stopLoop = new StopLoop();
        stopLoop.setMaxReceivedHeaders(2);
        MailData bouncedMail =
                ExampleMailData.fromResource(getClass(), "looping.eml");
        stopLoop.data(bouncedMail);
    }

    @Test
    public void testNotLoopingData() throws TooMuchDataException,
            RejectException, IOException {
View Full Code Here

Examples of net.citizensnpcs.api.npc.NPC.data()

        NPC npc = ((BukkitScriptEntryData)scriptEntry.entryData).getNPC().getCitizen();

        boolean vulnerable;

        if (toggle == Toggle.TOGGLE)
            vulnerable = !npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);

        else vulnerable = Boolean.valueOf(toggle.toString());

        npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
    }
View Full Code Here

Examples of net.citizensnpcs.api.npc.NPC.data()

        if (toggle == Toggle.TOGGLE)
            vulnerable = !npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);

        else vulnerable = Boolean.valueOf(toggle.toString());

        npc.data().set(NPC.DEFAULT_PROTECTED_METADATA, !vulnerable);
    }
}
View Full Code Here

Examples of net.kuujo.copycat.internal.log.SnapshotEntry.data()

    assertEquals(log.firstIndex(), 5);
    assertEquals(log.lastIndex(), 5);
    SnapshotEntry entry = log.getEntry(5);
    assertEquals(entry.term(), 1);
    assertEquals("Hello world!", new String(entry.data()));
  }

  public void testCompactMiddleOfLog() throws Exception {
    appendEntries();
    log.compact(3,
View Full Code Here

Examples of net.sf.sahi.response.HttpResponse.data()

public class Substituter {

    public HttpResponse replaceHttps(final HttpRequest request) {
        HttpResponse response = new RemoteRequestProcessor().processHttp(request);
        byte[] bytes = response.data();
        String data = new String(bytes);
        data = data.replaceAll("https", "http");
        response.setData(data.getBytes());
        return response;
    }
View Full Code Here

Examples of net.tomp2p.dht.FutureGet.data()

        .versionKey(key.versionKey()).routingConfiguration(routingConfig).requestP2PConfiguration(requestConfig)
        .start().awaitUninterruptibly();
    getStats.finished(futureGet.isSuccess());
    LOG.debug("Get is success {}. Reason: {}", futureGet.isSuccess(), futureGet.failedReason());

    if (futureGet.data() != null) {
      return futureGet.data();
    } else {
      return null;
    }
  }
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.