Examples of writeBytes()


Examples of org.iq80.leveldb.util.SliceOutput.writeBytes()

        // read key
        Slice key = Slices.allocate(sharedKeyLength + nonSharedKeyLength);
        SliceOutput sliceOutput = key.output();
        if (sharedKeyLength > 0) {
            Preconditions.checkState(previousEntry != null, "Entry has a shared key but no previous entry was provided");
            sliceOutput.writeBytes(previousEntry.getKey(), 0, sharedKeyLength);
        }
        sliceOutput.writeBytes(data, nonSharedKeyLength);

        // read value
        Slice value = data.readSlice(valueLength);
View Full Code Here

Examples of org.jboss.jms.message.JBossBytesMessage.writeBytes()

      m.setJMSType("testType");
      setCorrelationID(m, i);
     
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());     
View Full Code Here

Examples of org.jboss.jms.message.JBossStreamMessage.writeBytes()

      setCorrelationID(m, i);
     
      m.setPayload(new ArrayList());
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());
View Full Code Here

Examples of org.jboss.netty.buffer.BigEndianHeapChannelBuffer.writeBytes()

                .addQuestion("Running?")
                .build();
        ChannelBuffer buf = (ChannelBuffer) encoder.encode(null, null, query);
        ChannelBuffer buf2 = new BigEndianHeapChannelBuffer(buf.readableBytes() + 8);
        buf2.writeInt(123);
        buf2.writeBytes(buf);

        buf2.readInt();
        ProtobufDecoder decoder = new ProtobufDecoder();
        decoder.addMessageType(Query.getDefaultInstance());
        Message message = (Message) decoder.decode(null, null, buf2);
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.writeBytes()

   
    // now build the wire contents.
    ChannelBuffer buffer = ChannelBuffers.directBuffer(len+5);
    buffer.writeByte((byte)this.messageType);
    buffer.writeInt(len+4);
    buffer.writeBytes(buff);
    Channels.write(this.ctx, this.message.getFuture(), buffer, this.message.getRemoteAddress());
  }

  private static void trace(String... msg) {
    LogManager.logTrace(LogConstants.CTX_ODBC, (Object[])msg);
View Full Code Here

Examples of org.jboss.netty.buffer.DynamicChannelBuffer.writeBytes()

    }

    @Converter
    public static ChannelBuffer toByteBuffer(byte[] bytes) {
        ChannelBuffer buf = new DynamicChannelBuffer(bytes.length);
        buf.writeBytes(bytes);
        return buf;
    }
}
View Full Code Here

Examples of org.jboss.remoting3.jmx.protocol.CancellableDataOutputStream.writeBytes()

     * @throws IOException
     */
    private void writeHeader(final Channel channel) throws IOException {
        CancellableDataOutputStream dos = new CancellableDataOutputStream(channel.writeMessage());
        try {
            dos.writeBytes("JMX");
            byte[] versions = Versions.getSupportedVersions();
            dos.writeInt(versions.length);
            dos.write(versions);
            if (Version.isSnapshot()) {
                dos.write(SNAPSHOT);
View Full Code Here

Examples of org.jboss.remotingjmx.protocol.CancellableDataOutputStream.writeBytes()

        private void sendVersionZeroHeader(Channel channel) throws IOException {
            log.debug("Selecting version 0x00 to receive full version list.");
            CancellableDataOutputStream dos = new CancellableDataOutputStream(channel.writeMessage());
            try {
                dos.writeBytes(JMX);
                dos.writeByte(0x00);
                String remotingJMXVersion = Version.getVersionString();
                byte[] versionBytes = remotingJMXVersion.getBytes("UTF-8");
                dos.writeInt(versionBytes.length);
                dos.write(versionBytes);
View Full Code Here

Examples of org.jboss.test.messaging.jms.message.SimpleJMSBytesMessage.writeBytes()

        SimpleJMSBytesMessage m = new SimpleJMSBytesMessage();
       
        log.debug("creating JMS Message type " + m.getClass().getName());
       
        String bytes = "jboss messaging";
        m.writeBytes(bytes.getBytes());
        return m;
    }
   
    protected void assertEquivalent(Message m, int mode) throws JMSException
    {
View Full Code Here

Examples of org.jboss.test.messaging.jms.message.SimpleJMSStreamMessage.writeBytes()

        SimpleJMSStreamMessage m = new SimpleJMSStreamMessage();
       
        log.debug("creating JMS Message type " + m.getClass().getName());
       
        m.writeBoolean(true);
        m.writeBytes("jboss".getBytes());
        m.writeChar('c');
        m.writeDouble(1.0D);
        m.writeFloat(2.0F);
        m.writeInt(3);
        m.writeLong(4L);
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.