Package java.io

Examples of java.io.DataOutput.writeInt()


    DataOutput baosDos = new DataOutputStream(baos);

    BlockType.TRAILER.write(baosDos);
    baosDos.writeLong(fileInfoOffset);
    baosDos.writeLong(loadOnOpenDataOffset);
    baosDos.writeInt(dataIndexCount);

    if (version == 1) {
      // This used to be metaIndexOffset, but it was not used in version 1.
      baosDos.writeLong(0);
    } else {
View Full Code Here


      baosDos.writeLong(0);
    } else {
      baosDos.writeLong(uncompressedDataIndexSize);
    }

    baosDos.writeInt(metaIndexCount);
    baosDos.writeLong(totalUncompressedBytes);
    if (version == 1) {
      baosDos.writeInt((int) Math.min(Integer.MAX_VALUE, entryCount));
    } else {
      // This field is long from version 2 onwards.
View Full Code Here

    }

    baosDos.writeInt(metaIndexCount);
    baosDos.writeLong(totalUncompressedBytes);
    if (version == 1) {
      baosDos.writeInt((int) Math.min(Integer.MAX_VALUE, entryCount));
    } else {
      // This field is long from version 2 onwards.
      baosDos.writeLong(entryCount);
    }
    baosDos.writeInt(compressionCodec.ordinal());
View Full Code Here

      baosDos.writeInt((int) Math.min(Integer.MAX_VALUE, entryCount));
    } else {
      // This field is long from version 2 onwards.
      baosDos.writeLong(entryCount);
    }
    baosDos.writeInt(compressionCodec.ordinal());

    if (version > 1) {
      baosDos.writeInt(numDataIndexLevels);
      baosDos.writeLong(firstDataBlockOffset);
      baosDos.writeLong(lastDataBlockOffset);
View Full Code Here

      baosDos.writeLong(entryCount);
    }
    baosDos.writeInt(compressionCodec.ordinal());

    if (version > 1) {
      baosDos.writeInt(numDataIndexLevels);
      baosDos.writeLong(firstDataBlockOffset);
      baosDos.writeLong(lastDataBlockOffset);
      Bytes.writeStringFixedSize(baosDos, comparatorClassName,
          MAX_COMPARATOR_NAME_LENGTH);
    }
View Full Code Here

      baosDos.writeLong(firstDataBlockOffset);
      baosDos.writeLong(lastDataBlockOffset);
      Bytes.writeStringFixedSize(baosDos, comparatorClassName,
          MAX_COMPARATOR_NAME_LENGTH);
    }
    baosDos.writeInt(version);

    outputStream.write(baos.toByteArray());
  }

  /**
 
View Full Code Here

        if( controlData.remaining() == 0 )
            return;
       
        DataOutput data = new DataOutputStream(new PacketOutputStream(controlData));

        data.writeInt(lastLogFileId);
        data.writeBoolean(lastMark!=null);
        if( lastMark!=null )
            lastMark.writeToDataOutput(data);
        data.writeBoolean(loadedFromCleanShutDown);
       
View Full Code Here

        @Override
        public void write(RevFeature feature, OutputStream out) throws IOException {
            DataOutput data = new DataOutputStream(out);
            writeHeader(data, "feature");
            data.writeInt(feature.getValues().size());
            for (Optional<Object> field : feature.getValues()) {
                FieldType type = FieldType.forValue(field);
                data.writeByte(type.getTag());
                if (type != FieldType.NULL) {
                    DataStreamValueSerializerV1.write(field, data);
View Full Code Here

        @Override
        public void write(RevFeatureType object, OutputStream out) throws IOException {
            DataOutput data = new DataOutputStream(out);
            writeHeader(data, "featuretype");
            writeName(object.getName(), data);
            data.writeInt(object.sortedDescriptors().size());
            for (PropertyDescriptor desc : object.type().getDescriptors()) {
                writeProperty(desc, data);
            }
        }
View Full Code Here

        @Override
        public void write(RevTree tree, OutputStream out) throws IOException {
            DataOutput data = new DataOutputStream(out);
            writeHeader(data, "tree");
            data.writeLong(tree.size());
            data.writeInt(tree.numTrees());

            Envelope envBuff = new Envelope();

            if (tree.features().isPresent()) {
                data.writeInt(tree.features().get().size());
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.