Examples of writeBytes()


Examples of javax.jms.ObjectMessage.writeBytes()

            BytesMessage src = (BytesMessage) message;
            final int LEN = 100;
            byte[] buf = new byte[LEN];
            int bytesRead = src.readBytes ( buf );
            while ( bytesRead >= 0 ) {
                m.writeBytes ( buf, 0, bytesRead );
                bytesRead = src.readBytes ( buf );
            }

            ret = m;
        } else {
View Full Code Here

Examples of javax.jms.StreamMessage.writeBytes()

      log.info("+++ testStreamMessage");
      StreamMessage sent = session.createStreamMessage();
      sent.writeBoolean(true);
      sent.writeByte((byte) 1);
      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
View Full Code Here

Examples of javax.jms.TextMessage.writeBytes()

        }
        case Bytes: {
            BytesMessage message = session.createBytesMessage();
            if (body != null) {
                byte[] payload = context.getTypeConverter().convertTo(byte[].class, exchange, body);
                message.writeBytes(payload);
            }
            return message;
        }
        case Map: {
            MapMessage message = session.createMapMessage();
View Full Code Here

Examples of net.gleamynode.netty.buffer.ChannelBuffer.writeBytes()

                        }
                    }
                    if (result.bytesProduced() > 0) {
                        outNetBuf.flip();
                        msg = ChannelBuffers.buffer(outNetBuf.remaining());
                        msg.writeBytes(outNetBuf.array(), 0, msg.capacity());
                        outNetBuf.clear();

                        if (pendingWrite.outAppBuf.hasRemaining()) {
                            // pendingWrite's future shouldn't be notified if
                            // only partial data is written.
View Full Code Here

Examples of net.minecraft.util.io.netty.buffer.ByteBuf.writeBytes()

       
      // Call the read method
      try {
        if (MinecraftReflection.isUsingNetty()) {
          ByteBuf buffer = createPacketBuffer();
          buffer.writeBytes(input, input.readInt());
         
          MinecraftMethods.getPacketReadByteBufMethod().invoke(handle, buffer);
        } else {
          if (input.readInt() != -1)
            throw new IllegalArgumentException("Cannot load a packet from 1.7.2 in 1.6.4.");
View Full Code Here

Examples of net.solosky.maplefetion.net.buffer.ByteArrayWriter.writeBytes()

                 
                  while(!closeFlag) {
                    writer.clear();
                    BytesEntry entry = bytesEntryQueue.poll(5,TimeUnit.SECONDS);    //等待五秒,如果没有元素也返回
                    if(entry!=null) {
                      writer.writeBytes(entry.getBytes(), entry.getOffset(), entry.getLength())//
                      while(bytesEntryQueue.size()>0) {
                        entry = bytesEntryQueue.poll();
                        writer.writeBytes(entry.getBytes(), entry.getOffset(), entry.getLength());
                      }
                    }
View Full Code Here

Examples of net.solosky.maplefetion.net.buffer.ByteWriter.writeBytes()

                 
                  while(!closeFlag) {
                    writer.clear();
                    BytesEntry entry = bytesEntryQueue.poll(5,TimeUnit.SECONDS);    //等待五秒,如果没有元素也返回
                    if(entry!=null) {
                      writer.writeBytes(entry.getBytes(), entry.getOffset(), entry.getLength())//
                      while(bytesEntryQueue.size()>0) {
                        entry = bytesEntryQueue.poll();
                        writer.writeBytes(entry.getBytes(), entry.getOffset(), entry.getLength());
                      }
                    }
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.BytesMessageImpl.writeBytes()

        msg.writeShort((short)2);
        msg.writeInt(3);
        msg.writeLong(4);
        msg.writeFloat(1.23f);
        msg.writeDouble(4.56);
        msg.writeBytes(createDummyByteArray(size));
       
        return msg;
    }
   
    public static MapMessageImpl createMapMessage( int size ) throws JMSException
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.StreamMessageImpl.writeBytes()

        msg.writeShort((short)2);
        msg.writeInt(3);
        msg.writeLong(4);
        msg.writeFloat(1.23f);
        msg.writeDouble(4.56);
        msg.writeBytes(createDummyByteArray(size));
       
        return msg;
    }
   
    public static TextMessageImpl createTextMessage( int size ) throws JMSException
View Full Code Here

Examples of org.activemq.message.ActiveMQBytesMessage.writeBytes()

    }
   
    private void writeBuffer(byte[] buf,int offset, int length) throws IOException{
        try {
        BytesMessage message = new ActiveMQBytesMessage();
        message.writeBytes(buf,offset,length);
        producer.send(message);
        }catch(JMSException jmsEx){
            IOException ioEx = new IOException(jmsEx.getMessage());
            throw ioEx;
        }
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.