Examples of writeByte()


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

      setReplyTo(m, i);    
      m.setJMSType("testType");
      setCorrelationID(m, i);
     
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
View Full Code Here

Examples of org.jboss.jms.message.JBossStreamMessage.writeByte()

      m.setJMSType("testType");
      setCorrelationID(m, i);
     
      m.setPayload(new ArrayList());
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
View Full Code Here

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

        @Override
        protected void sendResponse(final OutputStream outputStream) throws IOException {
            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(outputStream));
            marshaller.writeByte(StandaloneClientProtocol.PARAM_SERVER_MODEL);
            marshaller.writeObject(serverController.getServerModel());
            marshaller.finish();
        }
    }
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.writeByte()

 
 
  @Override
  public void sslDenied() {
    ChannelBuffer buffer = ChannelBuffers.directBuffer(1);
    buffer.writeByte('N');
    Channels.write(this.ctx, this.message.getFuture(), buffer, this.message.getRemoteAddress());   
  }
 
  private void sendErrorResponse(Throwable t) throws IOException {
    trace(t.getMessage());
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBufferOutputStream.writeByte()

          ChannelBuffers.buffer(requestSize);
    }
    ChannelBufferOutputStream outputStream =
        new ChannelBufferOutputStream(channelBuffer);
    outputStream.write(LENGTH_PLACEHOLDER);
    outputStream.writeByte(writableRequest.getType().ordinal());
    try {
      writableRequest.write(outputStream);
    } catch (IndexOutOfBoundsException e) {
      LOG.error("encode: Most likely the size of request was not properly " +
          "specified - see getSerializedSize() in " +
View Full Code Here

Examples of org.jboss.remotingjmx.protocol.CancellableDataOutputStream.writeByte()

        private void sendVersionZeroHeader(Channel channel) throws IOException {
            log.debug("Selecting version 0x00 to receive full version list.");
            CancellableDataOutputStream dos = new CancellableDataOutputStream(channel.writeMessage());
            try {
                dos.writeBytes(JMX);
                dos.writeByte(0x00);
                String remotingJMXVersion = Version.getVersionString();
                byte[] versionBytes = remotingJMXVersion.getBytes("UTF-8");
                dos.writeInt(versionBytes.length);
                dos.write(versionBytes);
            } catch (IOException e) {
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataOutputStream.writeByte()

    }

    public void testByte() throws IOException {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(Byte.MAX_VALUE * 2);
        for(short i=Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++)
            out.writeByte(i);

        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(short i=Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++) {
            byte read=in.readByte();
            assert i == read;
View Full Code Here

Examples of org.lilyproject.bytes.api.DataOutput.writeByte()

        DataOutput dataOutput = new DataOutputImpl();
        boolean b = random.nextBoolean();
        dataOutput.writeBoolean(b);
        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
        dataOutput.writeDouble(d);
        float f = random.nextFloat();
        dataOutput.writeFloat(f);
View Full Code Here

Examples of org.lilyproject.bytes.impl.DataOutputImpl.writeByte()

        DataOutput dataOutput = new DataOutputImpl();
        boolean b = random.nextBoolean();
        dataOutput.writeBoolean(b);
        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
        dataOutput.writeDouble(d);
        float f = random.nextFloat();
        dataOutput.writeFloat(f);
View Full Code Here

Examples of org.msgpack.packer.BufferPacker.writeByte()

    @Override
    public void testByte(byte v) throws Exception {
  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeByte(v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  byte ret = unpacker.readByte();
  assertEquals(v, ret);
    }
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.