Examples of readUnsignedShort()


Examples of java.io.DataInputStream.readUnsignedShort()

      DataInputStream in = new DataInputStream(new ByteBufferInputStream(input));

      int operationCode = in.readUnsignedByte();
      in.readByte();
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      this.logicalBlockAddress = (mss << 16) | lss;
      in.readShort();
      this.PMI = (in.readUnsignedByte() & 1) != 0;
      super.setControl(in.readUnsignedByte());
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedShort()

         }
         return false;
      }

      // check for at least JDK 1.5
      int minor = in.readUnsignedShort();
      int major = in.readUnsignedShort();
      if (major < 49)
      {
         // JDK 1.4 or less
         if (log.isTraceEnabled())
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedShort()

         return false;
      }

      // check for at least JDK 1.5
      int minor = in.readUnsignedShort();
      int major = in.readUnsignedShort();
      if (major < 49)
      {
         // JDK 1.4 or less
         if (log.isTraceEnabled())
         {
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedShort()

         }
         return false;
      }

      // this values is equal to the number entries in the constants pool + 1
      int constantPoolEntries = in.readUnsignedShort() - 1;

      // loop over all entries in the constants pool
      for (int i = 0; i < constantPoolEntries; i++)
      {
View Full Code Here

Examples of java.io.RandomAccessFile.readUnsignedShort()

    public void test_readUnsignedShort() throws IOException {
        // Test for method int java.io.RandomAccessFile.readUnsignedShort()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeShort(-1);
        raf.seek(0);
        assertEquals("Incorrect byte read/written", 65535, raf
                .readUnsignedShort());
        raf.close();
    }

    /**
 
View Full Code Here

Examples of javax.imageio.stream.ImageInputStream.readUnsignedShort()

        i.seek(0);
        h.check(i.readUnsignedByte() == 114);
        i.seek(0);
        h.check(i.readUnsignedInt() == 1919944055);
        i.seek(0);
        h.check(i.readUnsignedShort() == 29296);

        // Test ByteOrder.LITTLE_ENDIAN.
        i.setByteOrder(ByteOrder.LITTLE_ENDIAN);

        h.check(i.getByteOrder() == ByteOrder.LITTLE_ENDIAN);
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.readUnsignedShort()

        i.seek(0);
        h.check(i.readUnsignedByte() == 114);
        i.seek(0);
        h.check(i.readUnsignedInt() == 1919944055);
        i.seek(0);
        h.check(i.readUnsignedShort() == 29296);

        // Test ByteOrder.LITTLE_ENDIAN.
        i.setByteOrder(ByteOrder.LITTLE_ENDIAN);

        h.check(i.getByteOrder() == ByteOrder.LITTLE_ENDIAN);
View Full Code Here

Examples of javax.jms.BytesMessage.readUnsignedShort()

      {
         // OK
      }
      try
      {
         m.readUnsignedShort();
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotReadableException e)
      {
         // OK
View Full Code Here

Examples of org.activemq.message.ActiveMQBytesMessage.readUnsignedShort()

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

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

    public void testReadUnsignedShort() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeShort((short) 3000);
            msg.reset();
            assertTrue(msg.readUnsignedShort() == 3000);
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
    }
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.