Examples of readLong()


Examples of org.fusesource.hawtbuf.DataByteArrayInputStream.readLong()

        void decode(Buffer buffer) throws PagingException {
            DataByteArrayInputStream is = new DataByteArrayInputStream(buffer);
            int length = readFields(is);
            is.setPos((FILE_HEADER_SIZE / 2) - 8);
            long expectedChecksum = is.readLong();
            CRC32 checksum = new CRC32();
            checksum.update(buffer.data, 0, length);
            if (checksum.getValue() != expectedChecksum) {
                // Try the 2nd copy..
                is.setPos(FILE_HEADER_SIZE / 2);
View Full Code Here

Examples of org.gradle.messaging.serialize.Decoder.readLong()

            InputStream inputStream = new EncodedStream.EncodedInput(new ByteArrayInputStream(encoded.getBytes()));
            Decoder decoder = new InputStreamBackedDecoder(inputStream);
            String pidString = decoder.readNullableString();
            String uid = decoder.readString();
            Long pid = pidString == null ? null : Long.valueOf(pidString);
            UUID canonicalAddress = new UUID(decoder.readLong(), decoder.readLong());
            int port = decoder.readInt();
            int addressCount = decoder.readSmallInt();
            List<InetAddress> addresses = new ArrayList<InetAddress>(addressCount);
            for (int i = 0; i < addressCount; i++) {
                InetAddress address = InetAddress.getByAddress(decoder.readBinary());
View Full Code Here

Examples of org.gradle.messaging.serialize.InputStreamBackedDecoder.readLong()

            InputStream inputStream = new EncodedStream.EncodedInput(new ByteArrayInputStream(encoded.getBytes()));
            Decoder decoder = new InputStreamBackedDecoder(inputStream);
            String pidString = decoder.readNullableString();
            String uid = decoder.readString();
            Long pid = pidString == null ? null : Long.valueOf(pidString);
            UUID canonicalAddress = new UUID(decoder.readLong(), decoder.readLong());
            int port = decoder.readInt();
            int addressCount = decoder.readSmallInt();
            List<InetAddress> addresses = new ArrayList<InetAddress>(addressCount);
            for (int i = 0; i < addressCount; i++) {
                InetAddress address = InetAddress.getByAddress(decoder.readBinary());
View Full Code Here

Examples of org.h2.store.Data.readLong()

                store.readFully(s.getBytes(), 0, pageSize);
                CRC32 crc = new CRC32();
                crc.update(s.getBytes(), 4, pageSize - 4);
                int expected = (int) crc.getValue();
                int got = s.readInt();
                long writeCounter = s.readLong();
                int key = s.readInt();
                int firstTrunkPage = s.readInt();
                int firstDataPage = s.readInt();
                if (expected == got) {
                    logKey = key;
View Full Code Here

Examples of org.hornetq.api.core.HornetQBuffer.readLong()

               switch (b)
               {
                  case ADD_LARGE_MESSAGE_PENDING:
                  {
                     long messageID = buff.readLong();
                     if (!pendingLargeMessages.remove(new Pair<Long, Long>(recordDeleted.id, messageID)))
                     {
                        log.warn("Large message " + recordDeleted.id + " wasn't found when dealing with add pending large message");
                     }
                     installLargeMessageConfirmationOnTX(tx, recordDeleted.id);
View Full Code Here

Examples of org.hornetq.core.client.impl.LargeMessageBufferImpl.readLong()

   {
      LargeMessageBufferImpl buffer = createBufferWithLongs(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);

      for (int i = 1; i <= 15; i++)
      {
         Assert.assertEquals(i, buffer.readLong());
      }

      try
      {
         buffer.readByte();
View Full Code Here

Examples of org.hornetq.core.client.impl.LargeMessageControllerImpl.readLong()

   {
      LargeMessageControllerImpl buffer = createBufferWithLongs(3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);

      for (int i = 1; i <= 15; i++)
      {
         Assert.assertEquals(i, buffer.readLong());
      }

      try
      {
         buffer.readByte();
View Full Code Here

Examples of org.hornetq.jms.client.HornetQStreamMessage.readLong()

      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeByte(value);
      message.reset();

      Assert.assertEquals(value, message.readLong());
   }

   public void testReadLongFromShort() throws Exception
   {
      short value = RandomUtil.randomShort();
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.transport.Transport.readLong()

            short status = sendKeyOperation(key, transport, GET_WITH_VERSION, flags, GET_WITH_VERSION_RESPONSE);
            if (status == KEY_DOES_NOT_EXIST_STATUS) {
               return null;
            }
            if (status == NO_ERROR_STATUS) {
               long version = transport.readLong();
               if (log.isTraceEnabled()) {
                  log.trace("Received version: " + version);
               }
               byte[] value = transport.readArray();
               return new BinaryVersionedValue(version, value);
View Full Code Here

Examples of org.iq80.leveldb.util.SliceInput.readLong()

                // read header
                if (sliceInput.available() < 12) {
                    logMonitor.corruption(sliceInput.available(), "log record too small");
                    continue;
                }
                long sequenceBegin = sliceInput.readLong();
                int updateSize = sliceInput.readInt();

                // read entries
                WriteBatchImpl writeBatch = readWriteBatch(sliceInput, updateSize);
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.