public final class SummaryInformation extends PropertySet
DocumentSummaryInformation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_STREAM_NAME
The document name a summary information stream usually has in a POIFS filesystem.
|
static ClassID |
FORMAT_ID
The SummaryInformation's section's format ID.
|
OS_MACINTOSH, OS_WIN16, OS_WIN32
Constructor and Description |
---|
SummaryInformation()
Creates an empty
SummaryInformation . |
SummaryInformation(java.io.InputStream stream)
Creates a
SummaryInformation instance from an InputStream in the Horrible Property Set Format. |
SummaryInformation(PropertySet ps)
Creates a
SummaryInformation from a given PropertySet . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApplicationName()
Returns the application name (or
null ). |
java.lang.String |
getAuthor()
Returns the author (or
null ). |
int |
getCharCount()
Returns the character count or 0 if the
SummaryInformation
does not contain a char count. |
java.lang.String |
getComments()
Returns the comments (or
null ). |
java.util.Date |
getCreateDateTime()
Returns the creation time (or
null ). |
long |
getEditTime()
Returns the total time spent in editing the document (or
0 ). |
java.lang.String |
getKeywords()
Returns the keywords (or
null ). |
java.lang.String |
getLastAuthor()
Returns the last author (or
null ). |
java.util.Date |
getLastPrinted()
Returns the last printed time (or
null ). |
java.util.Date |
getLastSaveDateTime()
Returns the last save time (or
null ). |
int |
getPageCount()
Returns the page count or 0 if the
SummaryInformation does
not contain a page count. |
PropertyIDMap |
getPropertySetIDMap()
The id to name mapping of the properties in this set.
|
java.lang.String |
getRevNumber()
Returns the revision number (or
null ). |
int |
getSecurity()
Returns a security code which is one of the following values:
0 if the
SummaryInformation does not contain a
security field or if there is no security on the document. |
java.lang.String |
getSubject()
Returns the subject (or
null ). |
java.lang.String |
getTemplate()
Returns the template (or
null ). |
byte[] |
getThumbnail()
Returns the thumbnail (or
null ) when this
method is implemented. |
Thumbnail |
getThumbnailThumbnail()
Returns the thumbnail (or
null ), processed
as an object which is (largely) able to unpack the thumbnail
image data. |
java.lang.String |
getTitle() |
int |
getWordCount()
Returns the word count or 0 if the
SummaryInformation does
not contain a word count. |
void |
removeApplicationName()
Removes the application name.
|
void |
removeAuthor()
Removes the author.
|
void |
removeCharCount()
Removes the character count.
|
void |
removeComments()
Removes the comments.
|
void |
removeCreateDateTime()
Removes the creation time.
|
void |
removeEditTime()
Remove the total time spent in editing the document.
|
void |
removeKeywords()
Removes the keywords.
|
void |
removeLastAuthor()
Removes the last author.
|
void |
removeLastPrinted()
Removes the lastPrinted.
|
void |
removeLastSaveDateTime()
Remove the total time spent in editing the document.
|
void |
removePageCount()
Removes the page count.
|
void |
removeRevNumber()
Removes the revision number.
|
void |
removeSecurity()
Removes the security code.
|
void |
removeSubject()
Removes the subject.
|
void |
removeTemplate()
Removes the template.
|
void |
removeThumbnail()
Removes the thumbnail.
|
void |
removeTitle()
Removes the title.
|
void |
removeWordCount()
Removes the word count.
|
void |
setApplicationName(java.lang.String applicationName)
Sets the application name.
|
void |
setAuthor(java.lang.String author)
Sets the author.
|
void |
setCharCount(int charCount)
Sets the character count.
|
void |
setComments(java.lang.String comments)
Sets the comments.
|
void |
setCreateDateTime(java.util.Date createDateTime)
Sets the creation time.
|
void |
setEditTime(long time)
Sets the total time spent in editing the document.
|
void |
setKeywords(java.lang.String keywords)
Sets the keywords.
|
void |
setLastAuthor(java.lang.String lastAuthor)
Sets the last author.
|
void |
setLastPrinted(java.util.Date lastPrinted)
Sets the lastPrinted.
|
void |
setLastSaveDateTime(java.util.Date time)
Sets the total time spent in editing the document.
|
void |
setPageCount(int pageCount)
Sets the page count.
|
void |
setRevNumber(java.lang.String revNumber)
Sets the revision number.
|
void |
setSecurity(int security)
Sets the security code.
|
void |
setSubject(java.lang.String subject)
Sets the subject.
|
void |
setTemplate(java.lang.String template)
Sets the template.
|
void |
setThumbnail(byte[] thumbnail)
Sets the thumbnail.
|
void |
setTitle(java.lang.String title)
Sets the title.
|
void |
setWordCount(int wordCount)
Sets the word count.
|
addSection, clearSections, equals, getByteOrder, getClassID, getFirstSection, getFormat, getOSVersion, getProperties, getProperty, getPropertyStringValue, getSectionCount, getSections, hashCode, isDocumentSummaryInformation, isPropertySetStream, isPropertySetStream, isSummaryInformation, setByteOrder, setClassID, setFormat, setOSVersion, toInputStream, toString, wasNull, write, write
public static final java.lang.String DEFAULT_STREAM_NAME
public static final ClassID FORMAT_ID
public SummaryInformation()
SummaryInformation
.public SummaryInformation(PropertySet ps) throws UnexpectedPropertySetTypeException
SummaryInformation
from a given PropertySet
.ps
- A property set which should be created from a summary
information stream.UnexpectedPropertySetTypeException
- if ps
does not
contain a summary information stream.public SummaryInformation(java.io.InputStream stream) throws NoPropertySetStreamException, MarkUnsupportedException, java.io.IOException, java.io.UnsupportedEncodingException
SummaryInformation
instance from an InputStream
in the Horrible Property Set Format.The constructor reads the first few bytes from the stream and determines whether it is really a property set stream. If it is, it parses the rest of the stream. If it is not, it resets the stream to its beginning in order to let other components mess around with the data and throws an exception.
stream
- Holds the data making out the property set
stream.MarkUnsupportedException
- if the stream does not support the InputStream.markSupported()
method.java.io.IOException
- if the InputStream
cannot be accessed as needed.NoPropertySetStreamException
- if the input stream does not contain a property set.java.io.UnsupportedEncodingException
- if a character encoding is not supported.public PropertyIDMap getPropertySetIDMap()
PropertySet
getPropertySetIDMap
in class PropertySet
null
if not applicablepublic java.lang.String getTitle()
null
public void setTitle(java.lang.String title)
title
- The title to set.public void removeTitle()
public java.lang.String getSubject()
null
).null
public void setSubject(java.lang.String subject)
subject
- The subject to set.public void removeSubject()
public java.lang.String getAuthor()
null
).null
public void setAuthor(java.lang.String author)
author
- The author to set.public void removeAuthor()
public java.lang.String getKeywords()
null
).null
public void setKeywords(java.lang.String keywords)
keywords
- The keywords to set.public void removeKeywords()
public java.lang.String getComments()
null
).null
public void setComments(java.lang.String comments)
comments
- The comments to set.public void removeComments()
public java.lang.String getTemplate()
null
).null
public void setTemplate(java.lang.String template)
template
- The template to set.public void removeTemplate()
public java.lang.String getLastAuthor()
null
).null
public void setLastAuthor(java.lang.String lastAuthor)
lastAuthor
- The last author to set.public void removeLastAuthor()
public java.lang.String getRevNumber()
null
).null
public void setRevNumber(java.lang.String revNumber)
revNumber
- The revision number to set.public void removeRevNumber()
public long getEditTime()
0
).SummaryInformation
does not contain this information.public void setEditTime(long time)
time
- The time to set.public void removeEditTime()
public java.util.Date getLastPrinted()
null
).null
public void setLastPrinted(java.util.Date lastPrinted)
lastPrinted
- The lastPrinted to set.public void removeLastPrinted()
public java.util.Date getCreateDateTime()
null
).null
public void setCreateDateTime(java.util.Date createDateTime)
createDateTime
- The creation time to set.public void removeCreateDateTime()
public java.util.Date getLastSaveDateTime()
null
).null
public void setLastSaveDateTime(java.util.Date time)
time
- The time to set.public void removeLastSaveDateTime()
public int getPageCount()
SummaryInformation
does
not contain a page count.SummaryInformation
does not
contain a page count.public void setPageCount(int pageCount)
pageCount
- The page count to set.public void removePageCount()
public int getWordCount()
SummaryInformation
does
not contain a word count.null
public void setWordCount(int wordCount)
wordCount
- The word count to set.public void removeWordCount()
public int getCharCount()
SummaryInformation
does not contain a char count.null
public void setCharCount(int charCount)
charCount
- The character count to set.public void removeCharCount()
public byte[] getThumbnail()
null
) when this
method is implemented. Please note that the return type is likely to
change!
To process this data, you may wish to make use of the
Thumbnail
class. The raw data is generally
an image in WMF or Clipboard (BMP?) format
null
public Thumbnail getThumbnailThumbnail()
null
), processed
as an object which is (largely) able to unpack the thumbnail
image data.null
public void setThumbnail(byte[] thumbnail)
thumbnail
- The thumbnail to set.public void removeThumbnail()
public java.lang.String getApplicationName()
null
).null
public void setApplicationName(java.lang.String applicationName)
applicationName
- The application name to set.public void removeApplicationName()
public int getSecurity()
SummaryInformation
does not contain a
security field or if there is no security on the document. Use
PropertySet.wasNull()
to distinguish between the two
cases!
null
public void setSecurity(int security)
security
- The security code to set.public void removeSecurity()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.