public final class AVFile extends AVObject
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CLASS_NAME |
acl, className, endpointClassName, KEY_ACL, KEY_CLASSNAME, KEY_CREATED_AT, KEY_OBJECT_ID, KEY_UPDATED_AT, logger, objectId, operations, serverData, totallyOverwrite, UUID_LEN| 限定符 | 构造器和说明 |
|---|---|
|
AVFile() |
|
AVFile(String name,
byte[] data) |
|
AVFile(String name,
File localFile) |
|
AVFile(String name,
String url) |
|
AVFile(String name,
String url,
Map<String,Object> metaData) |
protected |
AVFile(String name,
String url,
Map<String,Object> metaData,
boolean external) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMetaData(String key,
Object val) |
void |
clearMetaData() |
boolean |
equals(Object o) |
Object |
get(String key) |
String |
getBucket() |
byte[] |
getData() |
InputStream |
getDataStream() |
String |
getKey() |
Map<String,Object> |
getMetaData() |
Object |
getMetaData(String key) |
String |
getMimeType() |
String |
getName() |
String |
getProvider() |
int |
getSize() |
String |
getThumbnailUrl(boolean scaleToFit,
int width,
int height)
Returns a thumbnail image url using QiNiu endpoints.
|
String |
getThumbnailUrl(boolean scaleToFit,
int width,
int height,
int quality,
String fmt) |
String |
getUrl() |
int |
hashCode() |
void |
increment(String key) |
void |
increment(String key,
Number value) |
void |
put(String key,
Object value) |
void |
remove(String key) |
Object |
removeMetaData(String key) |
io.reactivex.Observable<AVFile> |
saveInBackground()
save to cloud backend.
|
io.reactivex.Observable<AVFile> |
saveInBackground(boolean keepFileName)
save to cloud backend.
|
void |
saveInBackground(boolean keepFileName,
ProgressCallback progressCallback)
save to cloud backend.
|
void |
saveInBackground(ProgressCallback progressCallback)
save to cloud backend.
|
void |
setMetaData(Map<String,Object> metaData) |
void |
setMimeType(String mimeType) |
void |
setName(String name) |
static void |
setUploadHeader(String key,
String value) |
Map<String,Object> |
toMap() |
static AVFile |
withAbsoluteLocalPath(String name,
String absoluteLocalFilePath) |
static AVFile |
withFile(String name,
File file) |
static io.reactivex.Observable<AVFile> |
withObjectIdInBackground(String objectId) |
abortOperations, add, addAll, addAllUnique, addNewOperation, addUnique, bitAnd, bitOr, bitXor, cast, containsKey, createWithoutData, createWithoutData, decrement, decrement, delete, deleteAll, deleteAllInBackground, deleteEventually, deleteInBackground, extractCascadingObjects, fetch, fetch, fetchIfNeeded, fetchIfNeededInBackground, fetchInBackground, fetchInBackground, generateACLFromServerData, generateChangedParam, getACL, getAVFile, getAVGeoPoint, getAVObject, getBoolean, getBytes, getCascadingSaveObjects, getClassName, getCreatedAt, getCreatedAtString, getDate, getDouble, getInt, getJSONArray, getJSONObject, getList, getLong, getNumber, getObjectId, getQuery, getRelation, getRequestMethod, getRequestRawEndpoint, getServerData, getString, getUpdatedAt, getUpdatedAtString, getUuid, has, hasCircleReference, internalClassName, internalId, isDataAvailable, isFetchWhenSave, onDataSynchronized, onSaveFailure, onSaveSuccess, parseAVObject, refresh, refresh, refreshInBackground, refreshInBackground, registerSubclass, removeAll, resetAll, resetByRawData, resetServerData, save, saveAll, saveAllInBackground, saveEventually, saveInBackground, setACL, setClassName, setFetchWhenSave, setObjectId, toJSONObject, toJSONString, toString, validFieldName, verifyInternalIdpublic AVFile()
public AVFile(String name, byte[] data)
public static io.reactivex.Observable<AVFile> withObjectIdInBackground(String objectId)
public String getName()
public void setName(String name)
public void clearMetaData()
public int getSize()
public String getMimeType()
public void setMimeType(String mimeType)
public String getKey()
public String getBucket()
public String getUrl()
public String getProvider()
public String getThumbnailUrl(boolean scaleToFit, int width, int height)
scaleToFit - width - height - getThumbnailUrl(boolean, int, int, int, String)public String getThumbnailUrl(boolean scaleToFit, int width, int height, int quality, String fmt)
public void saveInBackground(boolean keepFileName,
ProgressCallback progressCallback)
keepFileName - whether keep file name in url or not.progressCallback - progress callback.public void saveInBackground(ProgressCallback progressCallback)
progressCallback - progress callback.public io.reactivex.Observable<AVFile> saveInBackground()
saveInBackground 在类中 AVObjectpublic io.reactivex.Observable<AVFile> saveInBackground(boolean keepFileName)
keepFileName - whether keep file name in url or not.public byte[] getData()
public InputStream getDataStream()
public static AVFile withAbsoluteLocalPath(String name, String absoluteLocalFilePath) throws FileNotFoundException
public static AVFile withFile(String name, File file) throws FileNotFoundException
Copyright © 2019. All rights reserved.