public RevFeatureType readFeatureType(@Nullable ObjectId id, DataInput in,
FeatureTypeFactory typeFactory) throws IOException {
Name name = readName(in);
int propertyCount = readUnsignedVarInt(in);
List<AttributeDescriptor> attributes = new ArrayList<AttributeDescriptor>();
for (int i = 0; i < propertyCount; i++) {
attributes.add(readAttributeDescriptor(in, typeFactory));
}
SimpleFeatureType ftype = typeFactory.createSimpleFeatureType(name, attributes, null, false,
Collections.<Filter> emptyList(), BasicFeatureTypes.FEATURE, null);
RevFeatureType revtype;
if (id == null) {
revtype = RevFeatureTypeBuilder.build(ftype);
} else {
revtype = RevFeatureTypeBuilder.create(id, ftype);
}
return revtype;
}