DefaultFeatureCollection collection = new DefaultFeatureCollection();
collection.add(feature);
FeatureTransformer transformer = new FeatureTransformer();
transformer.setIndentation(4);
try {
TextTransfer.getInstance().javaToNative(transformer.transform(collection),
transferData);
} catch (TransformerException e) {
throw (RuntimeException) new RuntimeException().initCause(e);
}
}