java.lang.Object
com.esri.arcgisruntime.data.Attachment
Represents a feature attachment. Attachments are returned when you fetch the list of Attachments for a given
ArcGISFeature by calling
ArcGISFeature.fetchAttachmentsAsync()
. Also calling
ArcGISFeature.addAttachmentAsync(byte[], java.lang.String, java.lang.String)
will return the added Attachment.- Since:
- 100.0.0
-
Method Summary
Modifier and TypeMethodDescriptionFetches the content of this attachment.Gets the content type of this attachment.long
getId()
Gets the id of this attachment.getName()
Gets the name of this attachment.long
getSize()
Gets the size, in bytes, of this attachment.boolean
Gets whether the content of this attachment has been fetched.
-
Method Details
-
hasFetchedData
public boolean hasFetchedData()Gets whether the content of this attachment has been fetched. If not fetched, it can be fetched explicitly by calling fetchDataAsync.- Returns:
- true if the content of the attachment has been fetched; otherwise false.
- Since:
- 100.0.0
-
getId
public long getId()Gets the id of this attachment.- Returns:
- the id of this attachment
- Since:
- 100.1.0
-
getContentType
Gets the content type of this attachment. Valid types depend on the service associated with this feature. Examples include "text/plain", "image/jpg", "application/pdf", and so on.- Returns:
- the content type of this attachment. May be null
- Since:
- 100.0.0
-
getName
Gets the name of this attachment.- Returns:
- the name of this attachment. May be null
- Since:
- 100.0.0
-
getSize
public long getSize()Gets the size, in bytes, of this attachment.- Returns:
- the size, in bytes, of this attachment
- Since:
- 100.0.0
-
fetchDataAsync
Fetches the content of this attachment.- Returns:
- a ListenableFuture containing the content of this attachment as an InputStream upon successful completion of the asynchronous operation
- Since:
- 100.0.0
-