Examples of readBoolean()


Examples of java.io.RandomAccessFile.readBoolean()

        buf.writeBoolean(true);
        buf.flush();

        file.seek(0);
        assertThat(file.readBoolean(), is(false));
        assertThat(file.readBoolean(), is(true));

        eof(file);
    }

    /**
 
View Full Code Here

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

        h.check(i.getByteOrder() == ByteOrder.LITTLE_ENDIAN);
        i.seek(0);
        h.check(i.read() == 114);
        i.seek(0);
        h.check(i.readBoolean() == true);
        i.seek(0);
        h.check(i.readByte() == 114);
        i.seek(0);
        h.check(i.readChar() == '\u7072');
        i.seek(0);
View Full Code Here

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

        h.check(i.getByteOrder() == ByteOrder.BIG_ENDIAN);

        h.check(i.read() == 114);
        i.seek(0);
        h.check(i.readBoolean() == true);
        i.seek(0);
        h.check(i.readByte() == 114);
        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
View Full Code Here

Examples of javax.jms.BytesMessage.readBoolean()

      sent.writeObject("31415926535897932384626433832795");
      sent.writeUTF("31415926535897932384626433832795");

      BytesMessage recv = (BytesMessage) sendRecMsg(sent);
      log.debug("recv: "+recv);
      assertTrue("Boolean == true", recv.readBoolean() == true);
      assertTrue("Byte == 1", recv.readByte() == 1);
      byte[] bytes = new byte[testBytes.length];
      recv.readBytes(bytes);
      assertTrue("Bytes == Bytes[]",
         Arrays.equals(bytes, testBytes));
View Full Code Here

Examples of javax.jms.StreamMessage.readBoolean()

      sent.writeObject("31415926535897932384626433832795");
      sent.writeString("31415926535897932384626433832795");

      StreamMessage recv = (StreamMessage) sendRecMsg(sent);
      log.debug("recv: "+recv);
      assertTrue("Boolean == true", recv.readBoolean() == true);
      assertTrue("Byte == 1", recv.readByte() == 1);
      // Quirky spec behavior requires a read past the end of the byte[] field
      byte[] bytes = new byte[testBytes.length];
      recv.readBytes(bytes);
      assertTrue(recv.readBytes(bytes) < 0);
View Full Code Here

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

            // expected
        }

        attributes = new Object[] { null };
        impl = new SQLInputImpl(attributes, new HashMap<String, Class<?>>());
        assertFalse(impl.readBoolean());
    }

    /**
     * @tests {@link javax.sql.rowset.serial.SQLInputImpl#readByte()}
     */
 
View Full Code Here

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

   
    // Boolean
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
    assertEquals(true,msg.readBoolean());
   
    // Byte
    msg = new BytesMessageImpl();
    msg.writeBytes(dummy);
    msg.reset();
View Full Code Here

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

   
    // Boolean
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
    assertTrue(msg.readBoolean());
   
    // Byte
    msg = new StreamMessageImpl();
    msg.writeBoolean(true);
    msg.markAsReadOnly();
View Full Code Here

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

  public void testReadBoolean() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeBoolean(true);
      msg.reset();
      assertTrue(msg.readBoolean());
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

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

  {
    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      msg.writeBoolean(true);
      msg.reset();
      assertTrue(msg.readBoolean());
      msg.reset();
      assertTrue(msg.readString().equals("true"));
    }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.