Examples of writeUTF()


Examples of one.nio.util.DigestStream.writeUTF()

    protected final void generateUid() {
        if (this.uid == 0) {
            DigestStream ds = new DigestStream("MD5");
            try {
                ds.writeUTF(getClass().getName());
                writeExternal(ds);
            } catch (IOException e) {
                throw new IllegalStateException(e);
            }
            this.uid = ds.digest();
View Full Code Here

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

  }
  public void testReadUTF() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      String str = "this is a test";
      msg.writeUTF(str);
      msg.reset();
      assertTrue(msg.readUTF().equals(str));
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

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

    public void testReadUTF() {
        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
        try {
            String str = "this is a test";
            msg.writeUTF(str);
            msg.reset();
            assertTrue(msg.readUTF().equals(str));
        } catch (JMSException jmsEx) {
            jmsEx.printStackTrace();
            assertTrue(false);
View Full Code Here

Examples of org.apache.axis2.context.externalize.SafeObjectOutputStream.writeUTF()

        out.writeMap(properties);

        //---------------------------------------------------------
        // "nested"
        //---------------------------------------------------------
        out.writeUTF("parent");
        out.writeObject(parent);
    }


    /**
 
View Full Code Here

Examples of org.apache.cassandra.io.DataOutputBuffer.writeUTF()

        DataOutputBuffer dob = new DataOutputBuffer();
        dob.writeBoolean(rangeCompletedLocally);

        for (String key : keys)
        {
            dob.writeUTF(key);
        }
        byte[] data = Arrays.copyOf(dob.getData(), dob.getLength());
        return originalMessage.getReply(FBUtilities.getLocalAddress(), data);
    }
View Full Code Here

Examples of org.apache.cassandra.io.util.DataOutputBuffer.writeUTF()

        // pack message with header in a bytebuffer
        byte[] data;
        try
        {
            DataOutputBuffer buffer = new DataOutputBuffer();
            buffer.writeUTF(id);
            Message.serializer().serialize(message, buffer);
            data = buffer.getData();
        }
        catch (IOException e)
        {
View Full Code Here

Examples of org.apache.flink.runtime.io.network.serialization.DataOutputSerializer.writeUTF()

        ? new DataOutputSerializer(4)
        : new DataOutputSerializer(events.size() * 32);
      serializer.writeInt(events.size());

      for (AbstractEvent evt : events) {
        serializer.writeUTF(evt.getClass().getName());
        evt.write(serializer);
      }

      return serializer.wrapAsByteBuffer();
    }
View Full Code Here

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

      int wait, int retries) throws IOException {
    Path versionFile = new Path(rootdir, HConstants.VERSION_FILE_NAME);
    while (true) {
      try {
        FSDataOutputStream s = fs.create(versionFile);
        s.writeUTF(version);
        LOG.debug("Created version file at " + rootdir.toString() +
            " set its version at:" + version);
        s.close();
        return;
      } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.io.DataOutputBuffer.writeUTF()

  }

  @Test
  public void testExecDeserialization() throws IOException {
    DataOutputBuffer dob = new DataOutputBuffer();
    dob.writeUTF(methodName);
    dob.writeInt(1);
    Scan scan = new Scan();
    HbaseObjectWritable.writeObject(dob, scan, Scan.class, new Configuration());
    dob.writeUTF("org.apache.hadoop.hbase.client.Scan");
    Bytes.writeByteArray(dob, new byte[]{'a'});
View Full Code Here

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

    }

    public void testWriteString() throws Exception
    {
        JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
        bm.writeUTF("Bananas");
        bm.reset();
        String res = bm.readUTF();
        assertEquals("Bananas", res);
    }
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.