|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmicrosoft.exchange.webservices.data.ComplexProperty
microsoft.exchange.webservices.data.Attachment
microsoft.exchange.webservices.data.FileAttachment
public final class FileAttachment
Represents a file attachment.
Constructor Summary | |
---|---|
protected |
FileAttachment(Item owner)
* Initializes a new instance. |
Method Summary | |
---|---|
byte[] |
getContent()
* Gets the content of the attachment into memory. |
protected java.io.InputStream |
getContentStream()
Gets the content stream.Gets the name of the file the attachment is linked to. |
java.lang.String |
getFileName()
* Gets the name of the file the attachment is linked to. |
protected java.lang.String |
getXmlElementName()
Gets the name of the XML element. |
boolean |
isContactPhoto()
Gets a value indicating whether this attachment is a contact photo. |
void |
load(java.io.OutputStream stream)
* Loads the content of the file attachment into the specified stream. |
void |
load(java.lang.String fileName)
* Loads the content of the file attachment into the specified file. |
protected void |
setContent(byte[] content)
Sets the content. |
protected void |
setContentStream(java.io.InputStream contentStream)
Sets the content stream. |
protected void |
setFileName(java.lang.String fileName)
Sets the file name. |
void |
setIsContactPhoto(boolean isContactPhoto)
Sets the checks if is contact photo. |
protected boolean |
tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
* Tries to read element from XML. |
protected boolean |
tryReadElementFromXmlToPatch(microsoft.exchange.webservices.data.EwsServiceXmlReader reader)
For FileAttachment, the only thing need to patch is the AttachmentId. |
protected void |
writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer)
* Writes elements and content to XML. |
Methods inherited from class microsoft.exchange.webservices.data.Attachment |
---|
canSetFieldValue, getContentId, getContentLocation, getContentType, getId, getIsInline, getLastModifiedTime, getName, getOwner, getSize, internalLoad, isNew, load, setContentId, setContentLocation, setContentType, setIsInline, setName, throwIfThisIsNotNew |
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty |
---|
addOnChangeEvent, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FileAttachment(Item owner)
owner
- the ownerMethod Detail |
---|
protected java.lang.String getXmlElementName()
protected boolean tryReadElementFromXml(microsoft.exchange.webservices.data.EwsServiceXmlReader reader) throws java.lang.Exception
tryReadElementFromXml
in class Attachment
reader
- the reader
java.lang.Exception
- the exceptionprotected boolean tryReadElementFromXmlToPatch(microsoft.exchange.webservices.data.EwsServiceXmlReader reader) throws java.lang.Exception
tryReadElementFromXmlToPatch
in class ComplexProperty
reader
- The reader.
java.lang.Exception
protected void writeElementsToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer) throws java.lang.Exception
writeElementsToXml
in class Attachment
writer
- the writer
java.lang.Exception
- the exceptionpublic void load(java.io.OutputStream stream) throws java.lang.Exception
stream
- the stream
java.lang.Exception
- the exceptionpublic void load(java.lang.String fileName) throws java.lang.Exception
fileName
- the file name
java.lang.Exception
- the exceptionpublic java.lang.String getFileName()
protected void setFileName(java.lang.String fileName)
fileName
- the new file nameprotected java.io.InputStream getContentStream()
protected void setContentStream(java.io.InputStream contentStream)
contentStream
- the new content streampublic byte[] getContent()
protected void setContent(byte[] content)
content
- the new contentpublic boolean isContactPhoto() throws ServiceVersionException
ServiceVersionException
- the service version exceptionpublic void setIsContactPhoto(boolean isContactPhoto) throws ServiceVersionException
isContactPhoto
- the new checks if is contact photo
ServiceVersionException
- the service version exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |