Examples of writeInt()


Examples of org.apache.avro.io.Encoder.writeInt()

      // force handshake
      ByteBufferOutputStream bbo = new ByteBufferOutputStream();
      // direct because the payload is tiny.
      Encoder out = ENCODER_FACTORY.directBinaryEncoder(bbo, null);
      writeHandshake(out);
      out.writeInt(0);                              // empty metadata
      out.writeString("");                          // bogus message name
      List<ByteBuffer> response =
        getTransceiver().transceive(bbo.getBufferList());
      ByteBufferInputStream bbi = new ByteBufferInputStream(response);
      BinaryDecoder in =
View Full Code Here

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

        //---------------------------------------------------------
        // serialization version ID
        out.writeLong(serialVersionUID);

        // revision ID
        out.writeInt(revisionID);

        //---------------------------------------------------------
        // various simple fields
        //---------------------------------------------------------
        out.writeLong(timeOutInMilliSeconds);
View Full Code Here

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

    }

    public Message getReply(Message originalMessage) throws IOException
    {
        DataOutputBuffer dob = new DataOutputBuffer();
        dob.writeInt(rows.size());
        for (Row row : rows)
        {
            Row.serializer().serialize(row, dob);
        }
        byte[] data = Arrays.copyOf(dob.getData(), dob.getLength());
View Full Code Here

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

        DataOutputBuffer buffer = new DataOutputBuffer();
        try
        {
            buffer.writeLong(timestamp);
            buffer.writeByte(ColumnSerializer.EXPIRATION_MASK);
            buffer.writeInt(timeToLive);
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of org.apache.cassandra.io.util.DataOutputByteBuffer.writeInt()

            PureJavaCrc32 checksum = new PureJavaCrc32();
            final ByteBuffer buffer = alloc.getBuffer();
            DataOutputByteBuffer dos = new DataOutputByteBuffer(buffer);

            // checksummed length
            dos.writeInt((int) size);
            checksum.update(buffer, buffer.position() - 4, 4);
            buffer.putLong(checksum.getValue());

            int start = buffer.position();
            // checksummed mutation
View Full Code Here

Examples of org.apache.cassandra.utils.vint.EncodedDataOutputStream.writeInt()

        odos.flush();

        for (int i = Short.MAX_VALUE; i < ((int)Short.MAX_VALUE + 10000); i++)
        {
            out.writeInt(i);
            odos.writeInt(i);
        }
        out.flush();
        odos.flush();

        for (long i = Integer.MAX_VALUE; i < ((long)Integer.MAX_VALUE + 10000);i++)
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatIdOutputStream.writeInt()

    if (getCommittedDropState()) status |= FILE_COMMITTED_DROP;
    if (isReusableRecordId()) status |= FILE_REUSABLE_RECORDID;

    a_out.setPosition(0);
    a_out.setLimit(CONTAINER_INFO_SIZE);
    outStream.writeInt(formatIdInteger);
    outStream.writeInt(status);
    outStream.writeInt(pageSize);
    outStream.writeInt(spareSpace);
    outStream.writeInt(minimumRecordSize);
    outStream.writeShort(initialPages);
View Full Code Here

Examples of org.apache.derby.io.StorageRandomAccessFile.writeInt()

        CipherProvider tmpCipherProvider = createNewCipher(ENCRYPT,mainSecretKey,mainIV);
        tmpCipherProvider.encrypt(data, 0, data.length, data, 0);
        // openFileForWrite
        verifyKeyFile = privAccessFile(sf,Attribute.CRYPTO_EXTERNAL_KEY_VERIFY_FILE,"rw");
        // write the checksum length as int, and then the checksum and then the encrypted data
        verifyKeyFile.writeInt(checksum.length);
        verifyKeyFile.write(checksum);
        verifyKeyFile.write(data);
        verifyKeyFile.sync(true);
      }
      else
View Full Code Here

Examples of org.apache.flink.runtime.io.disk.iomanager.ChannelWriterOutputView.writeInt()

     
      long writeStart = System.currentTimeMillis();
     
      int valsLeft = NUM_INTS_WRITTEN;
      while (valsLeft-- > 0) {
        out.writeInt(valsLeft);
      }
     
      out.close();
      final int numBlocks = out.getBlockCount();
      writer.close();
View Full Code Here

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

    try {
      // create the serialized event list
      DataOutputSerializer serializer = events.size() == 0
        ? new DataOutputSerializer(4)
        : new DataOutputSerializer(events.size() * 32);
      serializer.writeInt(events.size());

      for (AbstractEvent evt : events) {
        serializer.writeUTF(evt.getClass().getName());
        evt.write(serializer);
      }
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.