Examples of readChar()


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

    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      char test = 'z';
      msg.writeChar(test);
      msg.reset();
      assertTrue(msg.readChar()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Character(test).toString()));
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

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

    public void testReadChar() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            msg.writeChar('a');
            msg.reset();
            assertTrue(msg.readChar() == 'a');
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
        }
    }
View Full Code Here

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

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

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

      // parse split file and process remaining splits
      FSDataInputStream tmpIn = fs.open(splitFile);
      StringBuilder sb = new StringBuilder(tmpIn.available());
      while (tmpIn.available() > 0) {
        sb.append(tmpIn.readChar());
      }
      tmpIn.close();
      for (String line : sb.toString().split("\n")) {
        String[] cmd = line.split(splitAlgo.separator());
        Preconditions.checkArgument(3 == cmd.length);
View Full Code Here

Examples of org.apache.jena.atlas.io.PeekReader.readChar()

    @Test public void unread2()
    {
        PeekReader r = make("abc") ;
        checkLineCol(r, INIT_LINE, INIT_COL) ;
        int ch = r.readChar() ;
        // Pushback does not move line/col backwards.
        checkLineCol(r, INIT_LINE, INIT_COL+1) ;
        assertEquals('b', r.peekChar()) ;
        checkLineCol(r, INIT_LINE, INIT_COL+1) ;
        r.pushbackChar('a') ;
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.readChar()

        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeChar('A');
            bm.reset();
            bm.readChar();
            // should throw
            bm.readChar();
            fail("expected exception did not occur");
        }
        catch (MessageEOFException m)
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.readChar()

        assertTrue(bm.readBoolean());
        assertTrue(!bm.readBoolean());
        assertEquals((byte)2, bm.readByte());
        byte[] bytes = new byte[4];
        bm.readBytes(bytes);
        assertEquals('g', bm.readChar());
        assertEquals((short) 29, bm.readShort());
        assertEquals(101, bm.readInt());
        assertEquals(50003222L, bm.readLong());
        assertEquals("Foobar", bm.readString());
        assertEquals(1.7f, bm.readFloat());
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.readChar()

  public void testReadChar() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeChar('a');
      msg.reset();
      assertTrue(msg.readChar() == 'a');
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQStreamMessage.readChar()

    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      char test = 'z';
      msg.writeChar(test);
      msg.reset();
      assertTrue(msg.readChar()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Character(test).toString()));
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.hornetq.jms.client.HornetQStreamMessage.readChar()

      HornetQStreamMessage message = new HornetQStreamMessage();

      message.writeChar(value);
      message.reset();

      Assert.assertEquals(value, message.readChar());
   }
  
   public void testReadCharFromNull() throws Exception
   {
      HornetQStreamMessage message = new HornetQStreamMessage();
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.