Examples of readInt()


Examples of org.lilyproject.bytes.impl.DataInputImpl.readInt()

        Assert.assertEquals(b, dataInput.readBoolean());
        Assert.assertEquals(bytes[0], dataInput.readByte());
        Assert.assertArrayEquals(bytes, dataInput.readBytes(10));
        Assert.assertEquals(d, dataInput.readDouble(), 0.0001);
        Assert.assertEquals(f, dataInput.readFloat(), 0.0001);
        Assert.assertEquals(i, dataInput.readInt());
        Assert.assertEquals(l, dataInput.readLong());
        Assert.assertEquals(s, dataInput.readShort());
        Assert.assertEquals(string, dataInput.readUTF());
        Assert.assertEquals(Math.abs(i), dataInput.readVInt());
        Assert.assertEquals(Math.abs(l), dataInput.readVLong());
View Full Code Here

Examples of org.menacheri.jetclient.communication.NettyMessageBuffer.readInt()

    {
      @Override
      public void onDataIn(Event event)
      {
        NettyMessageBuffer buffer = (NettyMessageBuffer)event.getSource();
        System.out.println("Remaining Human Population: " + buffer.readInt());
      }
    };
    session.addHandler(handler);
  }
}
View Full Code Here

Examples of org.menacheri.jetserver.communication.MessageBuffer.readInt()

    int type;
    int operation;
    boolean isDefaultProtocol = true;
    if(command instanceof MessageBuffer) {
      MessageBuffer buf = (MessageBuffer) command;
      type = buf.readInt();
      operation = buf.readInt();
    }else{
      // websocket
      isDefaultProtocol = false;
      List<Double> data = (List)command;
View Full Code Here

Examples of org.moparscape.msc.gs.connection.Packet.readInt()

      byte[] data = RSA.decrypt(p1.getData());
      Packet p = new Packet(session, data);

      boolean reconnecting = (p.readByte() == 1);

      int clientVersion = p.readInt();

      if (Config.SERVER_VERSION != clientVersion) {
        Logger.println("ip: " + ip + " | clientversion: "
            + clientVersion + " : " + Config.SERVER_VERSION);
      }
View Full Code Here

Examples of org.msgpack.unpacker.BufferUnpacker.readInt()

  MessagePack msgpack = new MessagePack();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeInt(v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker(bytes);
  int ret = unpacker.readInt();
  assertEquals(v, ret);
    }

    @Test @Override
    public void testLong() throws Exception {
View Full Code Here

Examples of org.msgpack.unpacker.Converter.readInt()

  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeInt(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        int ret = unpacker.readInt();
        assertEquals(v, ret);
    }

    @Test @Override
    public void testLong() throws Exception {
View Full Code Here

Examples of org.msgpack.unpacker.Unpacker.readInt()

  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeInt(v);
  byte[] bytes = packer.toByteArray();
        Unpacker unpacker = msgpack.createBufferUnpacker(bytes);
  int ret = unpacker.readInt();
  assertEquals(v, ret);
    }

    @Test @Override
    public void testLong() throws Exception {
View Full Code Here

Examples of org.objectweb.asm.ClassReader.readInt()

        String n = e.getName();
        if (n.endsWith(".class")) {
          n = n.substring(0, n.length() - 6).replace('/', '.');
          InputStream is = zip.getInputStream(e);
          ClassReader cr = new ClassReader(is);
          if (cr.readInt(4) != Opcodes.V1_6) {
            try {
              ClassWriter cw = new ClassWriter(
                  ClassWriter.COMPUTE_FRAMES);
              cr.accept(cw, 0);
              cr = new ClassReader(cw.toByteArray());
View Full Code Here

Examples of org.ow2.asm.ClassReader.readInt()

    }

    @Override
    public void test() throws Exception {
        ClassReader cr = new ClassReader(is);
        if (cr.readInt(4) != Opcodes.V1_6) {
            try {
                ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
                cr.accept(cw, 0);
                cr = new ClassReader(cw.toByteArray());
            } catch (Exception e) {
View Full Code Here

Examples of org.pdfclown.bytes.IBuffer.readInt()

                length = start + count;
              entryIndex < length;
              entryIndex++
              )
            {
              final int entryFieldType = (entryFieldSizes[0] == 0 ? 1 : body.readInt(entryFieldSizes[0]));
              switch(entryFieldType)
              {
                case FreeEntryType:
                {
                  final int nextFreeObjectNumber = body.readInt(entryFieldSizes[1]);
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.