Examples of writeShort()


Examples of org.activemq.message.ActiveMQStreamMessage.writeShort()

      msg.reset();
      assertTrue(((Byte)msg.readObject()).byteValue()==testByte);
      msg.clearBody();
     
      short testShort = 3;
      msg.writeShort(testShort);
      msg.reset();
      assertTrue(((Short)msg.readObject()).shortValue()==testShort);
      msg.clearBody();
     
      int testInt = 4;
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQBytesMessage.writeShort()

    }

    public void testReadShort() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeShort((short) 3000);
            msg.reset();
            assertTrue(msg.readShort() == 3000);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQStreamMessage.writeShort()

    public void testReadShort() {
        ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
        try {
            short test = (short) 4;
            msg.writeShort(test);
            msg.reset();
            assertTrue(msg.readShort() == test);
            msg.reset();
            assertTrue(msg.readInt() == test);
            msg.reset();
View Full Code Here

Examples of org.apache.cassandra.io.util.DataOutputBuffer.writeShort()

        {
            try
            {
                DataOutputBuffer out = new DataOutputBuffer(serializedSize);
                if (isStatic)
                    out.writeShort(STATIC_MARKER);

                for (int i = 0; i < components.size(); i++)
                {
                    ByteBufferUtil.writeWithShortLength(components.get(i), out);
                    out.write(endOfComponents[i]);
View Full Code Here

Examples of org.apache.cassandra.io.util.DataOutputPlus.writeShort()

                                      reducer.hasLegacyCounterShards);

        // in case no columns were ever written, we may still need to write an empty header with a top-level tombstone
        indexBuilder.maybeWriteEmptyRowHeader();

        out.writeShort(BigTableWriter.END_OF_ROW);

        close();

        return RowIndexEntry.create(currentPosition, emptyColumnFamily.deletionInfo().getTopLevelDeletion(), columnsIndex);
    }
View Full Code Here

Examples of org.apache.cassandra.utils.vint.EncodedDataOutputStream.writeShort()

        DataOutputStream out = new DataOutputStream(byteArrayOStream2);
       
        for (short i = 0; i < 10000; i++)
        {
            out.writeShort(i);
            odos.writeShort(i);
        }
        out.flush();
        odos.flush();

        for (int i = Short.MAX_VALUE; i < ((int)Short.MAX_VALUE + 10000); i++)
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatIdOutputStream.writeShort()

    outStream.writeInt(formatIdInteger);
    outStream.writeInt(status);
    outStream.writeInt(pageSize);
    outStream.writeInt(spareSpace);
    outStream.writeInt(minimumRecordSize);
    outStream.writeShort(initialPages);
    outStream.writeShort(PreAllocSize);    // write spare1
    outStream.writeLong(firstAllocPageNumber);
    outStream.writeLong(firstAllocPageOffset);
    outStream.writeLong(containerVersion);
    outStream.writeLong(estimatedRowCount);
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataOutputStream.writeShort()

      int offset = Integer.parseInt(arr[1]);
      short fileno = Short.parseShort(arr[2]);

      out.writeInt(docno);
      out.writeInt(offset);
      out.writeShort(fileno);

      cnt++;

      if (cnt % 1000 == 0) {
        LOG.info(cnt + " blocks written");
View Full Code Here

Examples of org.apache.hadoop.io.DataOutputBuffer.writeShort()

     */
    protected static void writeLzopHeader(OutputStream out,
        LzoCompressor.CompressionStrategy strategy) throws IOException {
      DataOutputBuffer dob = new DataOutputBuffer();
      try {
        dob.writeShort(LZOP_VERSION);
        dob.writeShort(LzoCompressor.LZO_LIBRARY_VERSION);
        dob.writeShort(LZOP_COMPAT_VERSION);
        switch (strategy) {
          case LZO1X_1:
            dob.writeByte(1);
View Full Code Here

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

         
          buffer = ArrayUtil.grow(buffer, requiredLength);
         
          output.reset(buffer);

          output.writeShort(analyzedLength);

          output.writeBytes(scratch.bytes, scratch.offset, scratch.length);

          output.writeInt(encodeWeight(iterator.weight()));
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.