Examples of readShort()


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

        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
        h.check(i.readShort() == 29296);
        i.seek(0);
        h.check(i.readUnsignedByte() == 114);
        i.seek(0);
        h.check(i.readUnsignedInt() == 1919944055);
        i.seek(0);
View Full Code Here

Examples of javax.jms.BytesMessage.readShort()

      byte[] bytes = new byte[testBytes.length];
      recv.readBytes(bytes);
      assertTrue("Bytes == Bytes[]",
         Arrays.equals(bytes, testBytes));
      assertTrue("Char == c", recv.readChar() == 'c');
      assertTrue("Short == 314159", recv.readShort() == 31415);
      assertTrue("Int == 314159", recv.readInt() == 314159);
      assertTrue("Long == 3141592653589793238L",
         recv.readLong() == 3141592653589793238L);
      assertTrue("Double == 3.1415926535897932384626433832795",
         recv.readDouble() == 3.1415926535897932384626433832795);
View Full Code Here

Examples of javax.jms.StreamMessage.readShort()

      assertTrue(recv.readBytes(bytes) < 0);
      assertTrue("Bytes == Bytes[]",
         Arrays.equals(bytes, testBytes));
      char c = recv.readChar();
      assertTrue("Char == c", c == 'c');
      assertTrue("Short == 314159", recv.readShort() == 31415);
      assertTrue("Int == 314159", recv.readInt() == 314159);
      assertTrue("Long == 3141592653589793238L",
         recv.readLong() == 3141592653589793238L);
      assertTrue("Double == 3.1415926535897932384626433832795",
         recv.readDouble() == 3.1415926535897932384626433832795);
View Full Code Here

Examples of javax.sql.rowset.serial.SQLInputImpl.readShort()

     */
    public void testReadShort() throws SQLException {
        Object[] attributes = new Object[] { Short.valueOf("3") };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals((short) 3, impl.readShort());

        try {
            impl.readShort();
            fail("should throw SQLException");
        } catch (SQLException e) {
View Full Code Here

Examples of krati.io.DataReader.readShort()

    try {
      r.open();
      r.position(DATA_START_POSITION);
     
      for (int i = 0; i < _arrayLength; i++) {
        shortArray.set(i, r.readShort());
      }
     
      _log.info(_file.getName() + " loaded in " + c.getElapsedTime());
    } finally {
      r.close();
View Full Code Here

Examples of loci.common.RandomAccessInputStream.readShort()

      addSeriesMeta("OriginY", originY);
      addSeriesMeta("OriginZ", originZ);
    }
    else ras.seek(88);

    int scanType = ras.readShort();
    switch (scanType) {
      case 0:
        addSeriesMeta("ScanType", "x-y-z scan");
        ms.dimensionOrder = "XYZCT";
        break;
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.BytesMessageImpl.readShort()

   
    // Short
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
    assertEquals(2+1*256,msg.readShort());
   
    // Char
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
View Full Code Here

Examples of net.timewalker.ffmq3.common.message.StreamMessageImpl.readShort()

   
    // Short
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    try { msg.readShort(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
    assertTrue(msg.readBoolean());

    // Char
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
View Full Code Here

Examples of org.activeio.PacketData.readShort()

        try {
            if( requestListener ==null )
                throw new IOException("The RequestListener has not been set.");

            PacketData data = new PacketData(packet);
            short requestId = data.readShort();           
            Packet reponse = requestListener.onRequest(packet);

            // Send the response...
            Packet header = createHeaderPacket(RESPONSE, requestId);       
            Packet rc = AppendedPacket.join(header, packet);       
View Full Code Here

Examples of org.activemq.message.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
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.