/** * Creates an empty {@link DocumentSummaryInformation}. */ public DocumentSummaryInformation() { getFirstSection().setFormatID(DOC_SUMMARY_INFORMATION); }
/** * Creates an empty {@link SummaryInformation}. */ public SummaryInformation() { getFirstSection().setFormatID(FORMAT_ID); }
/** * Creates section 2 if it is not already present. */ private void ensureSection2() { if (getSectionCount() < 2) { Section s2 = new Section(); s2.setFormatID(USER_DEFINED_PROPERTIES); addSection(s2); } }
/** * Sets the section's format ID. * * @param formatID The section's format ID as a byte array. It components * are in big-endian format. */ @SuppressWarnings("WeakerAccess") public void setFormatID(final byte[] formatID) { ClassID fid = getFormatID(); if (fid == null) { fid = new ClassID(); setFormatID(fid); } fid.setBytes(formatID); }
/** * Constructs a {@code Section} by doing a deep copy of an * existing {@code Section}. All nested {@code Property} * instances, will be their mutable counterparts in the new * {@code MutableSection}. * * @param s The section set to copy */ public Section(final Section s) { this._offset = -1; setFormatID(s.getFormatID()); for (Property p : s.properties.values()) { properties.put(p.getID(), new Property(p)); } setDictionary(s.getDictionary()); }
/** * Creates an empty {@link SummaryInformation}. */ public SummaryInformation() { getFirstSection().setFormatID(FORMAT_ID); }
/** * Creates an empty {@link DocumentSummaryInformation}. */ public DocumentSummaryInformation() { getFirstSection().setFormatID(DOC_SUMMARY_INFORMATION); }
/** * Creates section 2 if it is not already present. */ private void ensureSection2() { if (getSectionCount() < 2) { Section s2 = new Section(); s2.setFormatID(USER_DEFINED_PROPERTIES); addSection(s2); } }
/** * Sets the section's format ID. * * @param formatID The section's format ID as a byte array. It components * are in big-endian format. */ @SuppressWarnings("WeakerAccess") public void setFormatID(final byte[] formatID) { ClassID fid = getFormatID(); if (fid == null) { fid = new ClassID(); setFormatID(fid); } fid.setBytes(formatID); }
/** * Constructs a {@code Section} by doing a deep copy of an * existing {@code Section}. All nested {@code Property} * instances, will be their mutable counterparts in the new * {@code MutableSection}. * * @param s The section set to copy */ public Section(final Section s) { this._offset = -1; setFormatID(s.getFormatID()); for (Property p : s.properties.values()) { properties.put(p.getID(), new Property(p)); } setDictionary(s.getDictionary()); }
ms.setFormatID(SummaryInformation.FORMAT_ID);