Package com.esri.arcgisruntime.data
Class Attachment
- java.lang.Object
-
- com.esri.arcgisruntime.data.Attachment
-
public final class Attachment extends java.lang.Object
Represents a feature attachment. Attachments are returned when you fetch the list of Attachments for a given ArcGISFeature by callingArcGISFeature.fetchAttachmentsAsync()
. Also callingArcGISFeature.addAttachmentAsync(byte[], java.lang.String, java.lang.String)
will return the added Attachment.- Since:
- 100.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListenableFuture<java.io.InputStream>
fetchDataAsync()
Fetches the content of this attachment.java.lang.String
getContentType()
Gets the content type of this attachment.long
getId()
Gets the id of this attachment.java.lang.String
getName()
Gets the name of this attachment.long
getSize()
Gets the size, in bytes, of this attachment.boolean
hasFetchedData()
Gets whether the content of this attachment has been fetched.
-
-
-
Method Detail
-
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
public java.lang.String 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
public java.lang.String 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
public ListenableFuture<java.io.InputStream> 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
-
-