use of org.locationtech.geogig.api.RevFeatureImpl in project GeoGig by boundlessgeo.
the class FormatCommonV1 method readFeature.
public static RevFeature readFeature(ObjectId id, DataInput in) throws IOException {
final int count = in.readInt();
final ImmutableList.Builder<Optional<Object>> builder = ImmutableList.builder();
for (int i = 0; i < count; i++) {
final byte fieldTag = in.readByte();
final FieldType fieldType = FieldType.valueOf(fieldTag);
Object value = DataStreamValueSerializerV1.read(fieldType, in);
builder.add(Optional.fromNullable(value));
}
return new RevFeatureImpl(id, builder.build());
}
use of org.locationtech.geogig.api.RevFeatureImpl in project GeoGig by boundlessgeo.
the class FormatCommonV2 method readFeature.
public static RevFeature readFeature(ObjectId id, DataInput in) throws IOException {
final int count = readUnsignedVarInt(in);
final ImmutableList.Builder<Optional<Object>> builder = ImmutableList.builder();
for (int i = 0; i < count; i++) {
final byte fieldTag = in.readByte();
final FieldType fieldType = FieldType.valueOf(fieldTag);
Object value = DataStreamValueSerializerV2.read(fieldType, in);
builder.add(Optional.fromNullable(value));
}
return new RevFeatureImpl(id, builder.build());
}
Aggregations