Examples of readLong()


Examples of org.jboss.as.protocol.ByteDataInput.readLong()

                        for (int i = 0; i < numFiles; i++) {
                            expectHeader(input, DomainControllerProtocol.FILE_START);
                            expectHeader(input, DomainControllerProtocol.PARAM_FILE_PATH);
                            final String path = input.readUTF();
                            expectHeader(input, DomainControllerProtocol.PARAM_FILE_SIZE);
                            final long length = input.readLong();
                            log.debugf("Received file [%s] of length %d", path, length);
                            final File file = new File(localPath, path);
                            if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) {
                                throw new IOException("Unable to create local directory " + localPath.getParent());
                            }
View Full Code Here

Examples of org.jboss.marshalling.Unmarshaller.readLong()

            serverManagerName = unmarshaller.readUTF();
            expectHeader(unmarshaller, DomainClientProtocol.PARAM_SERVER_NAME);
            serverName = unmarshaller.readUTF();
            if (expectTimeout) {
                expectHeader(unmarshaller, DomainClientProtocol.PARAM_GRACEFUL_TIMEOUT);
                gracefulTimeout = unmarshaller.readLong();
            }
            unmarshaller.finish();
        }

        @Override
View Full Code Here

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

        final PacketHeader header;

        try {
            header = PacketHeader.fromInt(buffer.readInt());
            rc = buffer.readInt();
            ledgerId = buffer.readLong();
            entryId = buffer.readLong();
        } catch (IndexOutOfBoundsException ex) {
            LOG.error("Unparseable response from bookie: " + addr, ex);
            return;
        }
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBufferInputStream.readLong()

    int senderId = -1;
    long requestId = -1;
    int response = -1;
    try {
      senderId = inputStream.readInt();
      requestId = inputStream.readLong();
      response = inputStream.readByte();
      inputStream.close();
    } catch (IOException e) {
      throw new IllegalStateException(
          "messageReceived: Got IOException ", e);
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataInputStream.readLong()

        long[] numbers={Long.MIN_VALUE, -322649, -500, 0, 1, 100, 322649, Long.MAX_VALUE};
        for(long i: numbers)
            out.writeLong(i);
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(long i: numbers) {
            long num=in.readLong();
            assert num == i;
        }
    }

    public void testCompressedLong() throws IOException {
View Full Code Here

Examples of org.lilyproject.bytes.api.DataInput.readLong()

        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.lilyproject.bytes.impl.DataInputImpl.readLong()

        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.msgpack.unpacker.BufferUnpacker.readLong()

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

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

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

  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeLong(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        long ret = unpacker.readLong();
        assertEquals(v, ret);
    }

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

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

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

    @Test @Override
    public void testFloat() throws Exception {
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.