Examples of readInt()


Examples of net.sf.agentopia.platform.IAgentopiaConnection.readInt()

     * @param agent The agent to jump start.
     * @throws IOException
     */
    public void jumpStart(IAgentopiaAgent agent) throws IOException {
        IAgentopiaConnection comm = createDirectConnection(this.hostId, AgentopiaConstants.HEADER_AGENT);
        int intFlag = comm.readInt();
        if (AgentopiaConstants.HEADER_AGENT != intFlag) {
            throw new IOException("HEADER_AGENT flag expected as affirmation.");
        }
        comm.transferMe(agent);
        comm.shutDown();
View Full Code Here

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

   
    // Int
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageEOFException e) { /* OK */ }
    assertEquals(3,msg.readBytes(new byte[3]));
   
    // Long
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
View Full Code Here

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

   
    // Int
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readInt(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());
   
    // Long
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
View Full Code Here

Examples of net.tomp2p.storage.AlternativeCompositeByteBuf.readInt()

    buf.writeInt(2);
    cbuf.capacity(4);
    cbuf.addComponent(buf);
    cbuf.writerIndex(8);

    Assert.assertEquals(1, cbuf.readInt());
    Assert.assertEquals(2, cbuf.readInt());
  }

  @Test
  public void compositeBufferTest2() {
View Full Code Here

Examples of net.yura.lobby.util.ByteBufferInputStream.readInt()

//                buf.get(bytes);
//                data.addBytes(bytes);
                ByteBufferInputStream data = new ByteBufferInputStream(buf);
                while (true) {
                    if (size==-1 && data.available() >= 4) {
                        size = data.readInt();
                    }
                    else if (size>=0 && data.available() >= size) {
                        Message message = (Message)access.load(data, size);
                        size = -1;
                        messageFromServer(message);
View Full Code Here

Examples of nom.tam.util.BufferedDataInputStream.readInt()

                DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(vertexfile)));

                byte[] empty = new byte[converter.sizeOf()];
                try {
                    while(true) {
                        int vertexId = Integer.reverseBytes(dis.readInt());
                        dis.skipBytes(8);
                        dos.writeInt(Integer.reverseBytes(vertexId));
                        dos.write(empty);
                    }
                } catch (EOFException err) {}
View Full Code Here

Examples of org.activeio.PacketData.readInt()

        data.writeInt(logFileOffset);
    }   

    static public Location readFromPacket(Packet packet) throws IOException {
        PacketData data = new PacketData(packet);
        return new Location(data.readInt(), data.readInt());
    }

    public static Location readFromDataInput(DataInput data) throws IOException {
        return new Location(data.readInt(), data.readInt());
    }
View Full Code Here

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

  public void testReadInt() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeInt(3000);
      msg.reset();
      assertTrue(msg.readInt() == 3000);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.activemq.message.ActiveMQStreamMessage.readInt()

      msg.reset();
      assertTrue(msg.readByte()==test);
      msg.reset();
      assertTrue(msg.readShort()==test);
      msg.reset();
      assertTrue(msg.readInt()==test);
      msg.reset();
      assertTrue(msg.readLong()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Byte(test).toString()));
    }catch(JMSException jmsEx){
View Full Code Here

Examples of org.agilewiki.jid.ReadableBytes.readInt()

     */
    public Integer getValue() {
        if (value != null)
            return value;
        ReadableBytes readableBytes = readable();
        value = readableBytes.readInt();
        return value;
    }

    /**
     * Returns the number of bytes needed to serialize the persistent data.
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.