Examples of writeChar()


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

            msg.reset();
            assertTrue(((Double) msg.readObject()).doubleValue() == testDouble);
            msg.clearBody();

            char testChar = 'z';
            msg.writeChar(testChar);
            msg.reset();
            assertTrue(((Character) msg.readObject()).charValue() == testChar);
            msg.clearBody();

            byte[] data = new byte[50];
View Full Code Here

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

        try {
            message.writeBoolean(true);
            message.writeByte((byte) 1);
            message.writeBytes(new byte[1]);
            message.writeBytes(new byte[3], 0, 2);
            message.writeChar('a');
            message.writeDouble(1.5);
            message.writeFloat((float) 1.5);
            message.writeInt(1);
            message.writeLong(1);
            message.writeObject("stringobj");
View Full Code Here

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

            message.writeBytes(new byte[3], 0, 2);
            fail("Should have thrown exception");
        } catch (MessageNotWriteableException mnwe) {
        }
        try {
            message.writeChar('a');
            fail("Should have thrown exception");
        } catch (MessageNotWriteableException mnwe) {
        }
        try {
            message.writeDouble(1.5);
View Full Code Here

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

        try {
            message.writeBoolean(true);
            message.writeByte((byte) 1);
            message.writeBytes(new byte[1]);
            message.writeBytes(new byte[3], 0, 2);
            message.writeChar('a');
            message.writeDouble(1.5);
            message.writeFloat((float) 1.5);
            message.writeInt(1);
            message.writeLong(1);
            message.writeObject("stringobj");
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataOutputStream.writeChar()

  public void testOutputStreamClosedTwice() throws IOException {
    //HADOOP-4760 according to Closeable#close() closing already-closed
    //streams should have no effect.
    Path src = path("/test/hadoop/file");
    FSDataOutputStream out = fs.create(src);
    out.writeChar('H'); //write some data
    out.close();
    out.close();
  }
 
  protected Path path(String pathString) {
View Full Code Here

Examples of org.apache.hadoop.fs.FSDataOutputStream.writeChar()

    fs.createNewFile(FROM);

    FSDataOutputStream output = fs.create(FROM, true);
    for(int i = 0; i < 100; ++i) {
        output.writeInt(i);
        output.writeChar('\n');
    }
    output.close();
    fs.setTimes(FROM, MODIFICATION_TIME, 0);
    fs.setPermission(FROM, PERMISSIONS);
    fs.setTimes(new Path("d1"), MODIFICATION_TIME, 0);
View Full Code Here

Examples of org.apache.jackrabbit.core.journal.Record.writeChar()

        try {
            record = journal.getProducer(PRODUCER_ID).append();
            record.writeString(null);
            write(record, oldPrefix, newPrefix, uri);
            record.writeChar('\0');
            record.update();
            setRevision(record.getRevision());
            succeeded = true;
        } catch (JournalException e) {
            String msg = "Unable to create log entry: " + e.getMessage();
View Full Code Here

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

    public void testEOFChar() throws Exception
    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeChar('A');
            bm.reset();
            bm.readChar();
            // should throw
            bm.readChar();
            fail("expected exception did not occur");
View Full Code Here

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

    public void testEOFChar() throws Exception
    {
        try
        {
            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeChar('A');
            bm.reset();
            bm.readChar();
            // should throw
            bm.readChar();
            fail("expected exception did not occur");
View Full Code Here

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

    }
  }
  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
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.