Examples of readLong()


Examples of org.apache.jute_voltpatches.InputArchive.readLong()

                snapIS = new BufferedInputStream(new FileInputStream(snap));
                crcIn = new CheckedInputStream(snapIS, new Adler32());
                InputArchive ia = BinaryInputArchive.getArchive(crcIn);
                deserialize(dt,sessions, ia);
                long checkSum = crcIn.getChecksum().getValue();
                long val = ia.readLong("val");
                if (val != checkSum) {
                    throw new IOException("CRC corruption in snapshot :  " + snap);
                }
                foundValid = true;
                break;
View Full Code Here

Examples of org.apache.kahadb.util.DataByteArrayInputStream.readLong()

            return -1;
        }

        if( isChecksum() ) {

            long expectedChecksum = controlIs.readLong();
            if( expectedChecksum == 0 ) {
                // Checksuming was not enabled when the record was stored.
                // we can't validate the record :(
                return size;
            }
View Full Code Here

Examples of org.apache.lucene.store.ChecksumIndexInput.readLong()

      }
      if (format < FORMAT_MAXIMUM) {
        throw new IndexFormatTooNewException(input, format,
          FORMAT_MINIMUM, FORMAT_MAXIMUM);
      }
      version = input.readLong(); // read version
      counter = input.readInt(); // read counter
     
      for (int i = input.readInt(); i > 0; i--) { // read segmentInfos
        SegmentInfo si = new SegmentInfo(directory, format, input);
        if (si.getVersion() == null) {
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readLong()

  @Override
  public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {

    final String seedFileName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, SEED_EXT);
    final IndexInput in = state.directory.openInput(seedFileName, state.context);
    final long seed = in.readLong();
    if (LuceneTestCase.VERBOSE) {
      System.out.println("MockRandomCodec: reading from seg=" + state.segmentInfo.name + " formatID=" + state.segmentSuffix + " seed=" + seed);
    }
    in.close();
View Full Code Here

Examples of org.apache.lucene.store.InputStream.readLong()

        addElement(si);
      }
      if (input.getFilePointer() >= input.length())
        version = 0; // old file format without version number
      else
        version = input.readLong(); // read version
    }
    finally {
      input.close();
    }
  }
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DocumentInputStream.readLong()

    }

    public InputStream getDataStream(DirectoryNode dir) throws IOException, GeneralSecurityException {
        DocumentInputStream dis = dir.createDocumentInputStream("EncryptedPackage");

        long size = dis.readLong();

        return new CipherInputStream(dis, getCipher());
    }
}
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInput.readLong()

  public FormulaRecord(RecordInputStream ris) {
    LittleEndianInput in = ris;
    field_1_row = in.readUShort();
    field_2_column = in.readShort();
    field_3_xf = in.readShort();
    long valueLongBits  = in.readLong();
    field_5_options = in.readShort();
    specialCachedValue = SpecialCachedValue.create(valueLongBits);
    if (specialCachedValue == null) {
      field_4_value = Double.longBitsToDouble(valueLongBits);
    }
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.readLong()

        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.readLong()

        byte[] bytes = new byte[4];
        bm.readBytes(bytes);
        assertEquals('g', bm.readChar());
        assertEquals((short) 29, bm.readShort());
        assertEquals(101, bm.readInt());
        assertEquals(50003222L, bm.readLong());
        assertEquals("Foobar", bm.readString());
        assertEquals(1.7f, bm.readFloat());
        assertEquals(8.7d, bm.readDouble());
    }
View Full Code Here

Examples of org.apache.qpid.proton.TestDecoder.readLong()

        assertEquals(42, d.readUnsignedShort().intValue());
        assertEquals(-42, d.readShort().intValue());
        assertEquals(12345, d.readUnsignedInteger().intValue());
        assertEquals(-12345, d.readInteger().intValue());
        assertEquals(12345, d.readUnsignedLong().longValue());
        assertEquals(-12345, d.readLong().longValue());
        assertEquals(0.125, d.readFloat().floatValue(), 0e-10);
        assertEquals(0.125, d.readDouble().doubleValue(), 0e-10);
    }

    @Test
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.