GeometryFactory gf = new GeometryFactory();
int index = 10;
Coordinate[] coords1 = { new Coordinate(0, 0), new Coordinate(++index, ++index) };
Coordinate[] coords2 = { new Coordinate(0, index), new Coordinate(index, 0) };
LineString[] lines = { gf.createLineString(coords1), gf.createLineString(coords2) };
MultiLineString sampleMultiLine = gf.createMultiLineString(lines);
SimpleFeature toBeUpdated = writer.next();
toBeUpdated.setAttribute("SHAPE", sampleMultiLine);
writer.write();