Examples of writeInt()


Examples of com.caucho.hessian.io.Hessian2Output.writeInt()

    if (log.isLoggable(Level.FINEST)) {
      log.finest(this + " message " + payload
                + " {to:" + to + ", from:" + from + "}");
    }

    out.writeInt(HmtpPacketType.MESSAGE.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(payload);

    out.flushBuffer();
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriter.writeInt()

                } else if (c == Float.class) {
                    w.writeFloat((Float) o);
                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
                    w.writeShort((Short) o);
                } else if (c == Duration.class) {
                    w.writeCharacters(((Duration) o).toString());
                } else if (c == XMLGregorianCalendar.class) {
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriterImpl.writeInt()

                } else if (c == Float.class) {
                    w.writeFloat((Float) o);
                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
                    w.writeShort((Short) o);
                } else if (c == Duration.class) {
                    w.writeCharacters(((Duration) o).toString());
                } else if (c == XMLGregorianCalendar.class) {
View Full Code Here

Examples of com.esotericsoftware.kryo.io.ByteBufferOutput.writeInt()

  public void testByteBufferOutputWithPreallocatedMemory () {
    long bufAddress = UnsafeUtil.unsafe().allocateMemory(4096);
    try {
      ByteBufferOutput outputBuffer = new ByteBufferOutput(bufAddress, 4096);
      outputBuffer.writeInt(10);

      ByteBufferInput inputBuffer = new ByteBufferInput(outputBuffer.getByteBuffer());
      inputBuffer.readInt();
      inputBuffer.release();
View Full Code Here

Examples of com.esotericsoftware.kryo.io.Output.writeInt()

/** @author Nathan Sweet <misc@n4te.com> */
public class ChunkedTest extends KryoTestCase {
  public void testChunks () {
    Output output = new Output(512);
    output.writeInt(1234);
    OutputChunked outputChunked = new OutputChunked(output);
    outputChunked.writeInt(1);
    outputChunked.endChunks();
    outputChunked.writeInt(2);
    outputChunked.endChunks();
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.writeInt()

public class ChunkedTest extends KryoTestCase {
  public void testChunks () {
    Output output = new Output(512);
    output.writeInt(1234);
    OutputChunked outputChunked = new OutputChunked(output);
    outputChunked.writeInt(1);
    outputChunked.endChunks();
    outputChunked.writeInt(2);
    outputChunked.endChunks();
    outputChunked.writeInt(3);
    outputChunked.endChunks();
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.writeInt()

            SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg;
            ChannelBuffer frame = ChannelBuffers.buffer(
                    ByteOrder.BIG_ENDIAN, SPDY_HEADER_SIZE + 8);
            frame.writeShort(version | 0x8000);
            frame.writeShort(SPDY_RST_STREAM_FRAME);
            frame.writeInt(8);
            frame.writeInt(spdyRstStreamFrame.getStreamId());
            frame.writeInt(spdyRstStreamFrame.getStatus().getCode());
            Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
            return;
        }
View Full Code Here

Examples of com.google.code.or.io.util.XSerializer.writeInt()

  /**
   *
   */
  public byte[] getPacketBody() throws IOException {
    final XSerializer ps = new XSerializer();
    ps.writeInt(this.command, 1);
    ps.writeFixedLengthString(this.databaseName);
    return ps.toByteArray();
  }
 
  /**
 
View Full Code Here

Examples of com.google.common.io.ByteArrayDataOutput.writeInt()

   * Marks that the clusters with the given clusterIds have consumed the mutation
   * @param clusterIds of the clusters that have consumed the mutation
   */
  public void setClusterIds(List<UUID> clusterIds) {
    ByteArrayDataOutput out = ByteStreams.newDataOutput();
    out.writeInt(clusterIds.size());
    for (UUID clusterId : clusterIds) {
      out.writeLong(clusterId.getMostSignificantBits());
      out.writeLong(clusterId.getLeastSignificantBits());
    }
    setAttribute(CONSUMED_CLUSTER_IDS, out.toByteArray());
View Full Code Here

Examples of com.google.common.io.LittleEndianDataOutputStream.writeInt()

    @Test
    public void whenWriteReadLittleEndian_thenCorrect() throws IOException {
        final int value = 100;

        final LittleEndianDataOutputStream writer = new LittleEndianDataOutputStream(new FileOutputStream("src/test/resources/test_le.txt"));
        writer.writeInt(value);
        writer.close();

        final LittleEndianDataInputStream reader = new LittleEndianDataInputStream(new DataInputStream(new FileInputStream("src/test/resources/test_le.txt")));
        final int result = reader.readInt();
        reader.close();
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.