Examples of writeLong()


Examples of org.apache.lucene.store.ByteArrayDataOutput.writeLong()

        l1 = LONGS[i] = _TestUtil.nextLong(random, 0, Integer.MAX_VALUE) << 32;
      } else {
        l1 = LONGS[i] = _TestUtil.nextLong(random, 0, Long.MAX_VALUE);
      }
      bdo.writeVLong(l1);
      bdo.writeLong(l1);
    }
  }

  @AfterClass
  public static void afterClass() {
View Full Code Here

Examples of org.apache.lucene.store.ChecksumIndexOutput.writeLong()

    boolean success = false;

    try {
      segnOutput.writeInt(CURRENT_FORMAT); // write FORMAT
      segnOutput.writeLong(version);
      segnOutput.writeInt(counter); // write counter
      segnOutput.writeInt(size()); // write infos
      for (SegmentInfo si : this) {
        si.write(segnOutput);
      }
View Full Code Here

Examples of org.apache.lucene.store.IndexOutput.writeLong()

    }

    final String seedFileName = IndexFileNames.segmentFileName(state.segmentInfo.name, state.segmentSuffix, SEED_EXT);
    final IndexOutput out = state.directory.createOutput(seedFileName, state.context);
    try {
      out.writeLong(seed);
    } finally {
      out.close();
    }

    final Random random = new Random(seed);
View Full Code Here

Examples of org.apache.lucene.store.OutputStream.writeLong()

            // adjust the offsets later
            Iterator it = entries.iterator();
            while(it.hasNext()) {
                FileEntry fe = (FileEntry) it.next();
                fe.directoryOffset = os.getFilePointer();
                os.writeLong(0);    // for now
                os.writeString(fe.file);
            }

            // Open the files and copy their data into the stream.
            // Remeber the locations of each file's data section.
View Full Code Here

Examples of org.apache.poi.util.LittleEndianOutputStream.writeLong()

                // StreamSize (8 bytes): An unsigned integer that specifies the number of bytes used by data
                // encrypted within the EncryptedData field, not including the size of the StreamSize field.
                // Note that the actual size of the \EncryptedPackage stream (1) can be larger than this
                // value, depending on the block size of the chosen encryption algorithm
                leos.writeLong(countBytes);

                FileInputStream fis = new FileInputStream(fileOut);
                IOUtils.copy(fis, leos);
                fis.close();
                fileOut.delete();
View Full Code Here

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

    public void testEOFLong() throws Exception
    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
View Full Code Here

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

    public void testEOFLong() throws Exception
    {
        try
        {
            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeLong(4L);
            bm.reset();
            bm.readLong();
            // should throw
            bm.readLong();
            fail("expected exception did not occur");
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.writeLong()

  public void testGetBodyLength() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    int len = 10;
    try {
      for (int i = 0; i < len; i++) {
        msg.writeLong(5l);
      }
    } catch (JMSException ex) {
      ex.printStackTrace();
    }
    try {
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQStreamMessage.writeLong()

  public void testReadLong()
  {
    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      long test = 4l;
      msg.writeLong(test);
      msg.reset();
      assertTrue(msg.readLong()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Long(test).toString()));
    }catch(JMSException jmsEx){
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamOutput.writeLong()

        out.writeBoolean(false);
        out.writeByte((byte) 1);
        out.writeShort((short) -1);
        out.writeInt(-1);
        out.writeVInt(2);
        out.writeLong(-3);
        out.writeVLong(4);
        out.writeFloat(1.1f);
        out.writeDouble(2.2);
        out.writeUTF("hello");
        out.writeUTF("goodbye");
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.