use of org.openxmlformats.schemas.spreadsheetml.x2006.main.MapInfoDocument in project poi by apache.
the class MapInfo method writeTo.
protected void writeTo(OutputStream out) throws IOException {
MapInfoDocument doc = MapInfoDocument.Factory.newInstance();
doc.setMapInfo(mapInfo);
doc.save(out, DEFAULT_XML_OPTIONS);
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.MapInfoDocument in project poi by apache.
the class MapInfo method readFrom.
public void readFrom(InputStream is) throws IOException {
try {
MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
mapInfo = doc.getMapInfo();
maps = new HashMap<Integer, XSSFMap>();
for (CTMap map : mapInfo.getMapArray()) {
maps.put((int) map.getID(), new XSSFMap(map, this));
}
} catch (XmlException e) {
throw new IOException(e.getLocalizedMessage());
}
}
Aggregations