ps.clearSections();
final ClassID formatID = new ClassID();
formatID.setBytes(new byte[]{0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15});
final MutableSection s1 = new MutableSection();
s1.setFormatID(formatID);
s1.setProperty(2, SECTION1);
ps.addSection(s1);
final MutableSection s2 = new MutableSection();
s2.setFormatID(formatID);
s2.setProperty(2, SECTION2);
ps.addSection(s2);
poiFs.createDocument(ps.toInputStream(), STREAM_NAME);
poiFs.writeFilesystem(out);
out.close();