|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfFileAttachment
This class represents a file attachement that can be added to a PDF document.
Constructor Summary | |
PdfFileAttachment(String filePath)
Constructs an attachment with specified file. |
|
PdfFileAttachment(String filePath,
boolean compressAttachmentStream)
|
|
PdfFileAttachment(String attachmentName,
byte[] bs)
Constructs an attachment with specified byte array. |
|
PdfFileAttachment(String attachmentName,
byte[] bs,
boolean compressAttachmentStream)
|
Method Summary | |
Object |
clone()
|
byte[] |
getByteStream()
Returns a byte array containing the attachment file. |
String |
getFileAttachmentName()
Returns name of the attachment in the document. |
void |
setByteStream(byte[] bs)
Specifies a byte array from which the attachment file needs to be created. |
void |
setFileAttachmentName(String name)
Specifies name of the attachment in the document. |
void |
write(PdfDocument doc)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PdfFileAttachment(String filePath) throws IOException, PdfException
filePath
- pathname of the file
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfFileAttachment(String filePath, boolean compressAttachmentStream) throws IOException, PdfException
public PdfFileAttachment(String attachmentName, byte[] bs) throws IOException, PdfException
attachmentName
- name that needs to be used for the attachment in the
documentbs
- byte array containing the attachment file
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public PdfFileAttachment(String attachmentName, byte[] bs, boolean compressAttachmentStream) throws IOException, PdfException
Method Detail |
public Object clone()
public void setByteStream(byte[] bs)
bs
- byte array containing the file used for the
attachmentpublic byte[] getByteStream()
public void setFileAttachmentName(String name)
name
- name of the attachment in the documentpublic String getFileAttachmentName()
public void write(PdfDocument doc) throws IOException
IOException
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |