Examples of writeInt()


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

    @Override
    public void testInteger(int v) throws Exception {
  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeInt(v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  int ret = unpacker.readInt();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Packer.writeInt()

    @Override
    public void testInteger(int v) throws Exception {
  MessagePack msgpack = new JSON();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  packer.writeInt(v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createBufferUnpacker(bytes);
  int ret = unpacker.readInt();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Unconverter.writeInt()

    @Override
    public void testInteger(int v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeInt(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        Value ret = unpacker.readValue();
        assertEquals(r, ret);
    }
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.OutputStreamSerializer.writeInt()

    final OutputStreamSerializer outRaw = new OutputStreamSerializer(osBundle);
    outRaw.write("HG10UN".getBytes(), 0, 6);
    //
    RevlogStream clogStream = repo.getImplAccess().getChangelogStream();
    new ChunkGenerator(outRaw, clogMap).iterate(clogStream, clogRevs);
    outRaw.writeInt(0); // null chunk for changelog group
    //
    RevlogStream manifestStream = repo.getImplAccess().getManifestStream();
    new ChunkGenerator(outRaw, clogMap).iterate(manifestStream, manifestRevs.toArray(true));
    outRaw.writeInt(0); // null chunk for manifest group
    //
View Full Code Here

Examples of org.voltdb.messaging.FastSerializer.writeInt()

                e.printStackTrace();
                System.exit(-1);
            }
            byte passwordHash[] = md.digest(password.getBytes());
            FastSerializer fs = new FastSerializer();
            fs.writeInt(0);             // placeholder for length
            fs.writeByte(0);            // version
            fs.writeString(service);    // data service (export|database)
            fs.writeString(username);
            fs.write(passwordHash);
            final ByteBuffer fsBuffer = fs.getBuffer();
View Full Code Here

Examples of parquet.column.values.rle.RunLengthBitPackingHybridEncoder.writeInt()

      // TODO: what is a good initialCapacity?
      RunLengthBitPackingHybridEncoder encoder = new RunLengthBitPackingHybridEncoder(bitWidth, 64 * 1024);
      IntIterator iterator = encodedValues.iterator();
      try {
        while (iterator.hasNext()) {
          encoder.writeInt(iterator.next());
        }
        // encodes the bit width
        byte[] bytesHeader = new byte[] { (byte) bitWidth };
        BytesInput rleEncodedBytes = encoder.toBytes();
        if (DEBUG) LOG.debug("rle encoded bytes " + rleEncodedBytes.size());
View Full Code Here

Examples of research.store.StorableOutput.writeInt()

                ByteArrayOutputStream bufferStream = new ByteArrayOutputStream();

                //begin д����Ŀ�����ļ�
                StorableOutput textOutput = new StorableOutput(bufferStream);

                textOutput.writeInt(drawingViews.length);
                for (int i = 0; i < drawingViews.length; i++) {
                    textOutput.writeString(drawingViews[i].getDrawing().getTitle());
                }
                textOutput.close();
View Full Code Here

Examples of rocket.serialization.client.ObjectOutputStream.writeInt()

  protected void commitParameterTypes() {
    final List<String> parameterTypes = this.getParameterTypes();

    final ObjectOutputStream outputStream = this.getObjectOutputStream();
    outputStream.writeInt(parameterTypes.size());

    final Iterator<String> iterator = parameterTypes.iterator();
    while (iterator.hasNext()) {
      outputStream.writeObject(iterator.next());
    }
View Full Code Here

Examples of streamer.ByteBuffer.writeInt()

        byte[] ntlm_v2_hash = ntlm_compute_ntlm_v2_hash();

        buf.writeByte(0x1); // RespType
        buf.writeByte(0x1); // HighRespType
        buf.writeShort(0); // reserved
        buf.writeInt(0); // reserved
        buf.writeBytes(clientChallengeTimestamp); // Timestamp, 8 bytes
        buf.writeBytes(clientChallenge); // Client nonce, 8 bytes
        buf.writeInt(0); // reserved
        buf.writeBytes(authenticateTargetInfo); // Target Info block
        buf.trimAtCursor();
View Full Code Here

Examples of tahrir.tools.ByteArraySegment.ByteArraySegmentBuilder.writeInt()

    } else {
      // logger.debug("Sending short message");
      final ByteArraySegmentBuilder builder = ByteArraySegment.builder();
      PrimitiveMessageType.SHORT.write(builder);
      final int messageId = TrUtils.rand.nextInt();
      builder.writeInt(messageId);
      ShortMessageType.SIMPLE.write(builder);
      builder.write(message);
            ByteArraySegment basMessage = encryptOutbound(builder.build());
            final Resender resender = new Resender(messageId, TrConstants.UDP_SHORT_MESSAGE_RETRY_ATTEMPTS, sentListener,
                    basMessage, this, priority);
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.