Examples of writeInt()


Examples of io.airlift.slice.DynamicSliceOutput.writeInt()

        int keyLength = 0;
        if (state.getKey() != null && !state.getKey().isNull(0)) {
            keyLength = state.getKey().getLength(0);
        }
        sliceOutput.writeInt(keyLength);

        int valueLength = 0;
        if (state.getValue() != null && !state.getValue().isNull(0)) {
            valueLength = state.getValue().getLength(0);
        }
View Full Code Here

Examples of io.airlift.slice.SliceOutput.writeInt()

        int keyLength = 0;
        if (state.getKey() != null && !state.getKey().isNull(0)) {
            keyLength = state.getKey().getLength(0);
        }
        sliceOutput.writeInt(keyLength);

        int valueLength = 0;
        if (state.getValue() != null && !state.getValue().isNull(0)) {
            valueLength = state.getValue().getLength(0);
        }
View Full Code Here

Examples of io.netty.buffer.ByteBuf.writeInt()

              + getLength(destination.getInstanceName());
      int messageLength = message == null ? 0 : message.readableBytes();

      // Build message header
      ByteBuf headerBuf = channel.alloc().buffer(headerLength);
      headerBuf.writeInt(MESSAGE_VERSION).writeInt(messageType)
          .writeLong(messageId.getMostSignificantBits())
          .writeLong(messageId.getLeastSignificantBits());
      writeStringWithLength(headerBuf, destination.getScope().getCluster());
      writeStringWithLength(headerBuf, destination.getScope().getResource());
      writeStringWithLength(headerBuf, destination.getScope().getPartition());
View Full Code Here

Examples of io.netty.buffer.ByteBufOutputStream.writeInt()

        final int length = in.readableBytes();
        final InputStream bbIn = new ByteBufInputStream(in);

        final ByteBufOutputStream bbOut = new ByteBufOutputStream(out);
        bbOut.writeByte(properties);
        bbOut.writeInt(littleEndianDictionarySize);
        bbOut.writeLong(Long.reverseBytes(length));
        encoder.code(bbIn, bbOut, -1, -1, null);

        bbIn.close();
        bbOut.close();
View Full Code Here

Examples of io.netty.buffer.ChannelBuffer.writeInt()

                        "length does not fit into a medium integer: " + length);
            }
            header.writeMedium(length);
            break;
        case 4:
            header.writeInt(length);
            break;
        case 8:
            header.writeLong(length);
            break;
        default:
View Full Code Here

Examples of java.io.DataOutput.writeInt()

                        final BufferedInputStream fileInput = new BufferedInputStream(new FileInputStream(file));

                        final byte[] buffer = new byte[8092];
                        int read;
                        while ((read = fileInput.read(buffer)) > 0) {
                            output.writeInt(read);
                            output.write(buffer, 0, read);
                        }
                        output.writeInt(0);

                        output.writeLong(crc32.getValue());
View Full Code Here

Examples of java.io.DataOutputStream.writeInt()

                    break;
                }
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            DataOutputStream dos = new DataOutputStream(baos);
            dos.writeInt(nSource);
            dos.writeInt(nCapture);
            dos.writeInt(this.nCurrentHeight);
            dos.writeInt(this.nCurrentWidth);
            dos.flush();
            baos.flush();
View Full Code Here

Examples of java.io.ObjectOutput.writeInt()

            // Write the Dn
            dn.writeExternal( out );

            // Then the attributes.
            out.writeInt( entry.getAttributes().size() );

            // Iterate through the keys. We store the Attribute
            // here, to be able to restore it in the readExternal :
            // we need access to the registries, which are not available
            // in the ServerAttribute class.
View Full Code Here

Examples of java.io.ObjectOutputStream.writeInt()

        FastByteArrayOutputStream f = new FastByteArrayOutputStream();

        ObjectOutputStream out = new ObjectOutputStream(f);
        Student student1 = new Student("Chris", "Giroir", "111111", "elkfjwe", "wifjew");
        out.writeObject(student1);
        out.writeInt(5);
        out.close();

        out = new NoHeaderObjectOutputStream(f);
        Student student2 = new Student("Chris2", "Giroir2", "elkfjwe", "111111");
        out.writeObject(student2);
View Full Code Here

Examples of java.io.RandomAccessFile.writeInt()

             * DFD - This isn't true, but since we don't care about
             * NITF formatting, it may be. Just write out where we
             * are.
             */
            int location_section_location = (int) fout.getFilePointer() + 4;
            fout.writeInt(location_section_location);

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc: location section location is : "
                        + location_section_location);
            }
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.