NCMBFile

class NCMBFile : NCMBObject

File features handle class

NCMBFile is used to retrieve and save, update the installation data. Basic features are inherit from NCMBObject and NCMBBase

Constructors

NCMBFile
Link copied to clipboard
fun NCMBFile()

Constructor method

NCMBFile
Link copied to clipboard
fun NCMBFile(fileName: String, fileData: File)

Constructor method with fileName and fileData

NCMBFile
Link copied to clipboard
fun NCMBFile(fileName: String)

Constructor method with fileName only

NCMBFile
Link copied to clipboard
fun NCMBFile(params: JSONObject)

Constructor with JSONObject

Types

Companion
Link copied to clipboard
object Companion

Functions

delete
Link copied to clipboard
open fun delete()

Delete current NCMBObject from data store.

deleteInBackground
Link copied to clipboard
open fun deleteInBackground(deleteCallback: NCMBCallback)

Delete current NCMBObject from data store asynchronously.

fetch
Link copied to clipboard
open override fun fetch()

Fetch File object

fetchInBackground
Link copied to clipboard
open override fun fetchInBackground(fetchCallback: NCMBCallback)

Fetch file object in Background

get
Link copied to clipboard
fun get(key: String): Any?

get any type value to given key

getAcl
Link copied to clipboard
fun getAcl(): NCMBAcl
getArray
Link copied to clipboard
fun getArray(key: String, value: JSONArray? = null): JSONArray?

get JSONArray value from given key

getBoolean
Link copied to clipboard
fun getBoolean(key: String, value: Boolean? = null): Boolean?

get boolean value from given key

getCreateDate
Link copied to clipboard
fun getCreateDate(): Date?
getDate
Link copied to clipboard
fun getDate(key: String, value: Date? = null): Date?
getDouble
Link copied to clipboard
fun getDouble(key: String, value: Double? = null): Double?

get double value from given key

getGeo
Link copied to clipboard
fun getGeo(key: String): NCMBGeoPoint

get NCMBGeoPoint value from given key

getInt
Link copied to clipboard
fun getInt(key: String, value: Int? = null): Int?

get int value from given key

getJson
Link copied to clipboard
fun getJson(key: String, value: JSONObject? = null): JSONObject?

get JSONObject value from given key

getObjectId
Link copied to clipboard
fun getObjectId(): String?
getString
Link copied to clipboard
open fun getString(key: String, value: String? = null): String?

get string value from given key

getUpdateDate
Link copied to clipboard
fun getUpdateDate(): Date?
isContainsKey
Link copied to clipboard
fun isContainsKey(key: String?): Boolean

Check key is in keys

put
Link copied to clipboard
fun put(key: String, value: Any)

put any type value to given key

reflectResponseFileData
Link copied to clipboard
fun reflectResponseFileData(data: ByteArray?)
save
Link copied to clipboard
open override fun save()

Save File object

saveInBackground
Link copied to clipboard
open override fun saveInBackground(saveCallback: NCMBCallback)

Save file object in Background

setAcl
Link copied to clipboard
fun setAcl(acl: NCMBAcl)
setCreateDate
Link copied to clipboard
open fun setCreateDate(createDate: Date)
setObjectId
Link copied to clipboard
fun setObjectId(objectId: String)
update
Link copied to clipboard
fun update()

Update File ACL (This function is for ACL information only. To update file data, use save function instead.)

updateInBackground
Link copied to clipboard
fun updateInBackground(saveCallback: NCMBCallback)

Update File ACL in Background (This function is for ACL information only. To update file data, use save function instead.)

Properties

ACCESS_CONTROL_LIST
Link copied to clipboard
val ACCESS_CONTROL_LIST: String

ACL

fileData
Link copied to clipboard
var fileData: File?

File Object

fileDownloadByte
Link copied to clipboard
var fileDownloadByte: ByteArray? = null
fileName
Link copied to clipboard
var fileName: String

File name

fileNameToSetURL
Link copied to clipboard
var fileNameToSetURL: String
fileSize
Link copied to clipboard
var fileSize: Int = 0
ignoreKeys
Link copied to clipboard
val ignoreKeys: List<String>
keys
Link copied to clipboard
var keys: HashSet<String>
mimeType
Link copied to clipboard
var mimeType: String