public interface FileAttachment extends Annotation
Modifier and Type | Field and Description |
---|---|
static String |
ICON_DEFAULT |
static String |
ICON_GRAPH |
static String |
ICON_PAPERCLIP |
static String |
ICON_PUSHPIN |
static String |
ICON_TAG |
BORDERSTYLE_BEVELED, BORDERSTYLE_CLOUD, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
Modifier and Type | Method and Description |
---|---|
byte[] |
getCheckSum()
Returns the CRC checksum for the file contents.
|
byte[] |
getDeflatedContents()
Returns the file contents in deflated format
|
String |
getFileName()
Returns the name of the file.
|
int |
getFileSize()
Returns the length of the file, in bytes.
|
String |
getIconName()
Returns the name of the icon for this annotation.
|
InputStream |
getInputStream()
Returns the file contents as an input stream.
|
String |
getPopupText()
Returns the text that is displayed when the mouse hovers over the annotation.
|
void |
saveFile(File outFile)
Saves the content of the file to a file.
|
void |
setFileContents(byte[] fileContents)
Sets the file contents for the file attachment.
|
void |
setFileContents(File file)
Sets the file contents for the file attachment from a file.
|
void |
setFileContents(InputStream inStream)
Sets the file contents for this file attachment from an input stream.
|
void |
setFileName(String fileName)
Sets the name of the attached file.
|
void |
setIconName(String iconName)
Sets the icon name used when displaying this annotation.
|
void |
setPopupText(String popupText)
Sets the text that is displayed when the mouse hovers over the annotation.
|
void |
writeContents(OutputStream outStream)
Write the contents of the file attachment to an output stream
|
getActions, getBorderStyle, getBorderWidth, getCheckmarkStatus, getColor, getComponent, getContents, getCreator, getFlags, getModifiedDate, getName, getOpacity, getRectangle, getReviewHistory, getSubject, getSubtype, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, print, revalidate, setActions, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setModifiedDate, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPrintable, setReadOnly, setRectangle, setSubject, setSubtype, setTriggerActions, shiftRectangle
static final String ICON_GRAPH
static final String ICON_PAPERCLIP
static final String ICON_PUSHPIN
static final String ICON_TAG
static final String ICON_DEFAULT
String getIconName()
String getPopupText()
void setPopupText(String popupText)
popupText
- The new text string.void setIconName(String iconName)
iconName
- The name of the icon to use when displaying the annotation in its
un-opened mode. Please use one of the constants defined in this class (ICON_XXXX)
to set the name of the icon.void setFileContents(byte[] fileContents) throws PDFException, IOException
fileContents
- The new file contents.PDFException
IOException
void setFileContents(File file) throws PDFException, IOException
file
- The file to read the contents from.PDFException
IOException
void setFileContents(InputStream inStream) throws PDFException, IOException
PDFException
IOException
String getFileName()
void setFileName(String fileName)
fileName
- The name of the file.int getFileSize() throws IOException, PDFException
IOException
PDFException
byte[] getDeflatedContents() throws IOException, PDFException
IOException
PDFException
InputStream getInputStream() throws IOException, PDFException
IOException
PDFException
byte[] getCheckSum() throws PDFException, IOException
PDFException
IOException
void writeContents(OutputStream outStream) throws IOException
IOException
void saveFile(File outFile) throws IOException, PDFException
outFile
- the file to save to.IOException
PDFException