Examples of readShort()


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

      byte test = (byte)4;
      msg.writeByte(test);
      msg.reset();
      assertTrue(msg.readByte()==test);
      msg.reset();
      assertTrue(msg.readShort()==test);
      msg.reset();
      assertTrue(msg.readInt()==test);
      msg.reset();
      assertTrue(msg.readLong()==test);
      msg.reset();
View Full Code Here

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

    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.readShort()

                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
                msg.readShort();
                fail("Should have thrown exception");
            } catch (MessageFormatException mfe) {
            }
            msg.reset();
            try {
View Full Code Here

Examples of org.apache.activemq.util.DataByteArrayInputStream.readShort()

    //+|-,(long)lastAck,(byte)priority,(int)formatid,(short)globalLength....
    private void initFromEncodedBytes() {
        DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXidBytes);
        inputStream.skipBytes(10);
        formatId = inputStream.readInt();
        int globalLength = inputStream.readShort();
        globalTransactionId = new byte[globalLength];
        try {
            inputStream.read(globalTransactionId);
            branchQualifier = new byte[inputStream.available()];
            inputStream.read(branchQualifier);
View Full Code Here

Examples of org.apache.cassandra.utils.vint.EncodedDataInputStream.readShort()

        ByteArrayInputStream byteArrayIStream1 = new ByteArrayInputStream(byteArrayOStream1.toByteArray());
        EncodedDataInputStream idis = new EncodedDataInputStream(new DataInputStream(byteArrayIStream1));

        // assert reading Short
        for (int i = 0; i < 10000; i++)
            Assert.assertEquals(i, idis.readShort());

        // assert reading Integer
        for (int i = Short.MAX_VALUE; i < ((int)Short.MAX_VALUE + 10000); i++)
            Assert.assertEquals(i, idis.readInt());
View Full Code Here

Examples of org.apache.derby.iapi.services.io.ArrayInputStream.readShort()

    int status = inStream.readInt();
    pageSize = inStream.readInt();
    spareSpace = inStream.readInt();
    minimumRecordSize = inStream.readInt();
    initialPages = inStream.readShort();
    PreAllocSize = inStream.readShort();
    firstAllocPageNumber = inStream.readLong();
    firstAllocPageOffset = inStream.readLong();
    containerVersion = inStream.readLong();
    estimatedRowCount = inStream.readLong();
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataInputStream.readShort()

        FileSystem srcFs = getFS(srcPat);

        for (Path src : FileUtil.stat2Paths(srcFs.globStatus(srcPat), srcPat)) {
          Assert.isTrue(srcFs.isFile(src), "Source must be a file");
          i = srcFs.open(src);
          switch (i.readShort()) {
          case 0x1f8b: // RFC 1952
            i.seek(0);
            in = new GZIPInputStream(i);
            break;
          case 0x5345: // 'S' 'E'
View Full Code Here

Examples of org.apache.lucene.store.ByteArrayDataInput.readShort()

      Set<BytesRef> seenSurfaceForms = new HashSet<BytesRef>();

      int dedup = 0;
      while (reader.read(scratch)) {
        input.reset(scratch.bytes, scratch.offset, scratch.length);
        short analyzedLength = input.readShort();
        analyzed.grow(analyzedLength+2);
        input.readBytes(analyzed.bytes, 0, analyzedLength);
        analyzed.length = analyzedLength;

        long cost = input.readInt();
View Full Code Here

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

       this(fs.getRoot());
    }
   
    public EncryptionInfo(DirectoryNode dir) throws IOException {
        DocumentInputStream dis = dir.createDocumentInputStream("EncryptionInfo");
        versionMajor = dis.readShort();
        versionMinor = dis.readShort();
        encryptionFlags = dis.readInt();
       
        EncryptionMode encryptionMode;
        if (versionMajor == agile.versionMajor
View Full Code Here

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

   *
   * @param ris the RecordInputstream to read the record from
   */
  public NameRecord(RecordInputStream ris) {
    LittleEndianInput in = ris;
    field_1_option_flag                 = in.readShort();
    field_2_keyboard_shortcut           = in.readByte();
    int field_3_length_name_text        = in.readUByte();
    int field_4_length_name_definition  = in.readShort();
    field_5_externSheetIndex_plus1      = in.readShort();
    field_6_sheetNumber                 = in.readUShort();
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.