Examples of writeUTF()


Examples of org.codehaus.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.elasticsearch.common.io.stream.BytesStreamOutput.writeUTF()

        out.writeVInt(2);
        out.writeLong(-3);
        out.writeVLong(4);
        out.writeFloat(1.1f);
        out.writeDouble(2.2);
        out.writeUTF("hello");
        out.writeUTF("goodbye");

        BytesStreamInput in = new BytesStreamInput(out.copiedByteArray());
        assertThat(in.readBoolean(), equalTo(false));
        assertThat(in.readByte(), equalTo((byte) 1));
View Full Code Here

Examples of org.elasticsearch.common.io.stream.HandlesStreamOutput.writeUTF()

    @Test public void testSharedUTFHandles() throws Exception {
        BytesStreamOutput bytesOut = new BytesStreamOutput();
        HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5);
        String lowerThresholdValue = "test";
        String higherThresholdValue = "something that is higher than 5";
        out.writeUTF(lowerThresholdValue);
        out.writeUTF(higherThresholdValue);
        out.writeInt(1);
        out.writeUTF("else");
        out.writeUTF(higherThresholdValue);
        out.writeUTF(lowerThresholdValue);
View Full Code Here

Examples of org.exist.storage.io.VariableByteOutputStream.writeUTF()

        final Capture<String> strCapture = new Capture<String>();

        //write expectations
        mockOs.writeByte(captureByte(byteCapture));
        mockOs.writeInt(captureInt(intCapture));
        mockOs.writeUTF(capture(strCapture));

        replay(mockOs);

        symbolTable.localNameSymbols.write(mockOs);
View Full Code Here

Examples of org.hornetq.api.core.HornetQBuffer.writeUTF()

      String str1 = RandomUtil.randomString();
      String str2 = RandomUtil.randomString();
      Double d1 = RandomUtil.randomDouble();
      float f1 = RandomUtil.randomFloat();

      dynamic.writeUTF(str1);
      dynamic.writeString(str2);
      dynamic.writeDouble(d1);
      dynamic.writeFloat(f1);

      LargeMessageControllerImpl readBuffer = splitBuffer(3, dynamic.toByteBuffer().array());
View Full Code Here

Examples of org.jboss.as.protocol.ByteDataOutput.writeUTF()

        protected void sendRequest(final int protocolVersion, final OutputStream outputStream) throws IOException {
            ByteDataOutput output = null;
            try {
                output = new SimpleByteDataOutput(outputStream);
                output.write(DomainControllerProtocol.PARAM_HOST_ID);
                output.writeUTF(name);
                output.writeByte(DomainControllerProtocol.PARAM_HOST_CONTROLLER_HOST);
                final byte[] address = localManagementAddress.getAddress();
                output.writeInt(address.length);
                output.write(address);
                output.writeByte(DomainControllerProtocol.PARAM_HOST_CONTROLLER_PORT);
View Full Code Here

Examples of org.jboss.as.protocol.mgmt.FlushableDataOutput.writeUTF()

            // This is an error
            output.writeByte(DomainControllerProtocol.PARAM_ERROR);
            // send error code
            output.writeByte(errorCode);
            // error message
            output.writeUTF(message);
            // response end
            output.writeByte(ManagementProtocol.RESPONSE_END);
            output.close();
        } finally {
            StreamUtils.safeClose(output);
View Full Code Here

Examples of org.jboss.invocation.MarshalledValueOutputStream.writeUTF()

      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new MarshalledValueOutputStream(bos);

      // Extract fqn and write it out in fixed format
      if(fqn == null) fqn = "NULL"; // can't write null. tis can be commit.
      oos.writeUTF(fqn);
      // Serialize the rest of MethodCall object
      oos.writeObject(o);
      if (log_.isTraceEnabled()) {
         log_.trace("send");
         log_.trace(getColumnDump(bos.toByteArray()));
View Full Code Here

Examples of org.jboss.jms.message.JBossBytesMessage.writeUTF()

      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());     
      m.writeShort(randShort().shortValue());
      m.writeUTF(randString(1000));

      return m;     
   }
  
}
View Full Code Here

Examples of org.jboss.marshalling.Marshaller.writeUTF()

            marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_COUNT);
            marshaller.writeInt(serverStatuses.size());
            for (Map.Entry<ServerIdentity, ServerStatus> entry : serverStatuses.entrySet()) {
                marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_NAME);
                marshaller.writeUTF(entry.getKey().getServerName());
                marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_GROUP_NAME);
                marshaller.writeUTF(entry.getKey().getServerGroupName());
                marshaller.writeByte(ServerManagerProtocol.RETURN_SERVER_STATUS);
                marshaller.writeObject(entry.getValue());
            }
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.