KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

KiiObject Class

Provides APIs for key-value Object CRUD operation on KiiCloud.

Syntax

public class KiiObject : KiiBaseObject, AccessControllable

Remarks

KiiObject works as key-value object.
Example
             // example 1. Create new object on KiiCloud.
             KiiObject obj = Kii.Bucket("hiscore").NewKiiObject();
             obj["name"] = "John";
             obj["score"] = 95;
             obj.Save();
             // example 2. Update an object.
             KiiObject obj = KiiObject.CreateByUri(uri);
             obj.Refresh();
             obj["score"] = 100;
             obj.Save();
             

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from KiiBaseObject.

Public Properties

[read-only]
BodyContentType string . Gets the ContentType of the body.
[read-only]
CreatedTime long . Gets the created time on KiiCloud.
default property
Item (string) object . Gets or sets the object with the specified key. (Inherited from KiiBaseObject.)
[read-only]
ModifedTime long . Gets the modifed time on KiiCloud.
[read-only]
Uri Uri . Gets the URI of this instance.

Public Methods

Acl (ObjectAction) : KiiObjectAcl
Gets the acl for this object
static
CreateByUri (Uri) : KiiObject
Creates KiiObject by Uri
Delete ()
Delete KiiObject from KiiCloud
Delete (KiiObjectCallback)
Delete KiiObject from KiiCloud
DeleteBody ()
Delete the body of the KiiObject from KiiCloud.
DeleteBody (KiiObjectCallback)
Delete the body of the KiiObject from KiiCloud.
DownloadBody (System.IO.Stream)
Download the body of the KiiObject from KiiCloud.
DownloadBody (System.IO.Stream, KiiObjectBodyDownloadCallback)
Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.
DownloadBody (System.IO.Stream, KiiObjectBodyDownloadCallback, KiiObjectBodyProgressCallback)
Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.
DownloadBody (System.IO.Stream, KiiObjectBodyDownloadCallback, KiiObjectBodyProgressPercentageCallback)
Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.
GetBoolean (string) : bool
Gets the boolean in KiiBaseObject. (Inherited from KiiBaseObject.)
GetBoolean (string, bool) : bool
Gets the boolean. If key is not found, returns fallback. (Inherited from KiiBaseObject.)
GetByteArray (string) : byte[]
Gets the byte array with the specified key. (Inherited from KiiBaseObject.)
GetDouble (string) : double
Gets the double in KiiBaseObject. (Inherited from KiiBaseObject.)
GetDouble (string, double) : double
Gets the double. If key is not found, returns fallback. (Inherited from KiiBaseObject.)
GetGeoPoint (string) : KiiGeoPoint
Gets the GeoPoint associated with the given key.
GetGeoPoint (string, KiiGeoPoint) : KiiGeoPoint
Get the GeoPoint of this object tied to the specified key. If KiiGeoPoint can not be returned for specified key, fallback will be returned.
GetInt (string) : int
Gets the integer in KiiBaseObject. (Inherited from KiiBaseObject.)
GetInt (string, int) : int
Gets the integer. If key is not found, returns fallback. (Inherited from KiiBaseObject.)
GetJsonArray (string) : JsonOrg.JsonArray
Gets the Json array with the specified key. (Inherited from KiiBaseObject.)
GetJsonObject (string) : JsonOrg.JsonObject
Gets the JSON object with the specified key. (Inherited from KiiBaseObject.)
GetLong (string) : long
Gets the long in KiiBaseObject. (Inherited from KiiBaseObject.)
GetLong (string, long) : long
Gets the long. If key is not found, returns fallback. (Inherited from KiiBaseObject.)
GetString (string) : string
Gets the string in KiiBaseObject. (Inherited from KiiBaseObject.)
GetString (string, string) : string
Gets the string. If key is not found, returns fallback. (Inherited from KiiBaseObject.)
GetUri (string) : Uri
Gets the Uri with the specified key. (Inherited from KiiBaseObject.)
Has (string) : bool
Determine if this instance has the specified key. (Inherited from KiiBaseObject.)
Keys () : IEnumerable<string>
Gets the list of keys (Inherited from KiiBaseObject.)
ListAclEntries () : IList<KiiACLEntry<KiiObject, ObjectAction>>
Lists the acl entries of this object
ListAclEntries (KiiACLListCallback<KiiObject, ObjectAction>)
Lists the acl entries of this object
PublishBody () : string
Publishes the KiiObject attached file and return the file URL. URL will not be expired.
PublishBody (KiiObjectPublishCallback)
Publishes the KiiObject attached file and return the file URL. URL will not be expired.
PublishBodyExpiresAt (DateTime) : string
Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.
PublishBodyExpiresAt (DateTime, KiiObjectPublishCallback)
Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.
PublishBodyExpiresIn (long) : string
Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.
PublishBodyExpiresIn (long, KiiObjectPublishCallback)
Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.
Refresh ()
Get latest KiiObject form KiiCloud and refresh properties.
Refresh (KiiObjectCallback)
Get latest KiiObject form KiiCloud and refresh properties.
Remove (string)
Remove the specified key and value. (Inherited from KiiBaseObject.)
Save ()
Create or update the KiiObject on KiiCloud.
Save (KiiObjectCallback)
Create or update the KiiObject on KiiCloud.
Save (bool)
Create or update the KiiObject on KiiCloud.
Save (bool, KiiObjectCallback)
Create or update the KiiObject on KiiCloud.
SaveAllFields (bool)
Create or update the KiiObject on KiiCloud.
SaveAllFields (bool, KiiObjectCallback)
Create or update the KiiObject on KiiCloud.
SetGeoPoint (string, KiiGeoPoint)
Sets the geo point to this object with the specified key.
UploadBody (string, System.IO.Stream)
Upload the body of the KiiObject to KiiCloud.
UploadBody (string, System.IO.Stream, KiiObjectCallback)
Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.
UploadBody (string, System.IO.Stream, KiiObjectCallback, KiiObjectBodyProgressCallback)
Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.
UploadBody (string, System.IO.Stream, KiiObjectCallback, KiiObjectBodyProgressPercentageCallback)
Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.

Member Details

Acl Method

Gets the acl for this object

Syntax

public KiiObjectAcl Acl (ObjectAction action)

Parameters

action
Object ACL action.

Returns

KiiObjectAcl instance.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

BodyContentType Property

Gets the ContentType of the body.

Syntax

public string BodyContentType { get; }

Value

The type of the body content.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

CreateByUri Method

Creates KiiObject by Uri

Syntax

public static KiiObject CreateByUri (Uri uri)

Parameters

uri
Uri of KiiObject

Returns

KiiObject instance.

Remarks

Please use Uri property for an argument.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

CreatedTime Property

Gets the created time on KiiCloud.

Syntax

public long CreatedTime { get; }

Value

The created time.

Remarks

If this instance is not saved or refreshed, return -1

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Delete Method

Delete KiiObject from KiiCloud

Syntax

public void Delete ()

Exceptions

Type Reason
InvalidOperationException Is thrown when this instance doesn't have id or bucket.
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

Do not use this instance after this API is called.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Delete Method

Delete KiiObject from KiiCloud

Syntax

public void Delete (KiiObjectCallback callback)

Parameters

callback
Callback.

Remarks

Do not use this instance after this API is called.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DeleteBody Method

Delete the body of the KiiObject from KiiCloud.

Syntax

public void DeleteBody ()

Exceptions

Type Reason
InvalidOperationException Thrown if this object has not saved to the Kii Cloud.
KiiCorp.Cloud.Storage.NotFoundException Thrown if object body,object,bucket or bucket owner not exists in Kii Cloud.
KiiCorp.Cloud.Storage.UnauthorizedException Thrown if current user has no permission to delete the KiiObject body.

Remarks

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DeleteBody Method

Delete the body of the KiiObject from KiiCloud.

Syntax

public void DeleteBody (KiiObjectCallback callback)

Parameters

callback
KiiObjectCallback.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DownloadBody Method

Download the body of the KiiObject from KiiCloud.

Syntax

public void DownloadBody (System.IO.Stream outStream)

Parameters

outStream
The stream to be written. This stream is NOT closed after execution.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.NotFoundException Is thrown when KiiObject or body is not in KiiCloud.
KiiCorp.Cloud.Storage.UnauthorizedException Is thrown when current user cannot access this KiiObject.

Remarks

The stream will NOT be closed after executon.

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DownloadBody Method

Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.

Syntax

public void DownloadBody (System.IO.Stream outStream, KiiObjectBodyDownloadCallback callback)

Parameters

outStream
The stream to be written. This stream is NOT closed after execution.
callback
Callback.

Remarks

The stream will NOT be closed after executon.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DownloadBody Method

Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.

Syntax

public void DownloadBody (System.IO.Stream outStream, KiiObjectBodyDownloadCallback callback, KiiObjectBodyProgressCallback progressCallback)

Parameters

outStream
The stream to be written. This stream is NOT closed after execution.
callback
Callback.
progressCallback
This callback will be called when API will tell a progress.

Remarks

KiiObjectBodyProgressCallback doesn't work properly when use KiiInitializeBehaviour in order to initialize the KiiCloudSDK. Use KiiObject.DownloadBody(System.IO.Stream, KiiObjectBodyDownloadCallback, KiiObjectBodyProgressPercentageCallback) instead. The stream will NOT be closed after executon.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

DownloadBody Method

Download the body of the KiiObject from KiiCloud. This API will be executed asynchronously.

Syntax

public void DownloadBody (System.IO.Stream outStream, KiiObjectBodyDownloadCallback callback, KiiObjectBodyProgressPercentageCallback progressCallback)

Parameters

outStream
The stream to be written. This stream is NOT closed after execution.
callback
Callback.
progressCallback
This callback will be called when API will tell a progress.

Remarks

The stream will NOT be closed after executon.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetGeoPoint Method

Gets the GeoPoint associated with the given key.

Syntax

public KiiGeoPoint GetGeoPoint (string key)

Parameters

key
The key to retrieve. Must not null or empty string.

Returns

An instance of KiiGeoPoint tied to the key.

Exceptions

Type Reason
ArgumentException Is thrown when an argument is invalid. Please see parameter explanation.
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Throw IllegalKiiBaseObjectFormatException if can not get KiiGeoPoint object with specified key.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

GetGeoPoint Method

Get the GeoPoint of this object tied to the specified key. If KiiGeoPoint can not be returned for specified key, fallback will be returned.

Syntax

public KiiGeoPoint GetGeoPoint (string key, KiiGeoPoint fallBack)

Parameters

key
The key to retrieve.
fallBack
return if geo point can not be returned for the specified key.

Returns

An instance of KiiGeoPoint tied to the key.

Remarks

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

ListAclEntries Method

Lists the acl entries of this object

Syntax

Returns

The list of acl entries.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

ListAclEntries Method

Lists the acl entries of this object

Syntax

public void ListAclEntries (KiiACLListCallback<KiiObject, ObjectAction> callback)

Parameters

callback
Callback.

Returns

The list of acl entries.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

ModifedTime Property

Gets the modifed time on KiiCloud.

Syntax

public long ModifedTime { get; }

Value

The modifed time.

Remarks

If this instance is not saved or refreshed, return -1

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBody Method

Publishes the KiiObject attached file and return the file URL. URL will not be expired.

Syntax

public string PublishBody ()

Returns

The file URL.

Exceptions

Type Reason
InvalidOperationException Is thrown when this object is not uploaded in Kii Cloud.
KiiCorp.Cloud.Storage.NotFoundException Is thrown when Object / Bucket / Bucket owner is not in Kii Cloud.
KiiCorp.Cloud.Storage.UnauthorizedException Is throwns when current user cannot access this KiiObject.

Remarks

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBody Method

Publishes the KiiObject attached file and return the file URL. URL will not be expired.

Syntax

public void PublishBody (KiiObjectPublishCallback callback)

Parameters

callback
Callback.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBodyExpiresAt Method

Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.

Syntax

public string PublishBodyExpiresAt (DateTime expiresAt)

Parameters

expiresAt
A time of expired date in milliseconds (Since January 1, 1970 00:00:00 UTC).

Returns

The file URL.

Exceptions

Type Reason
InvalidOperationException Is thrown when this object is not uploaded in Kii Cloud.
KiiCorp.Cloud.Storage.NotFoundException Is thrown when Object / Bucket / Bucket owner is not in Kii Cloud.
KiiCorp.Cloud.Storage.UnauthorizedException Is throwns when current user cannot access this KiiObject.

Remarks

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBodyExpiresAt Method

Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.

Syntax

public void PublishBodyExpiresAt (DateTime expiresAt, KiiObjectPublishCallback callback)

Parameters

expiresAt
A time of expired date in milliseconds (Since January 1, 1970 00:00:00 UTC).
callback
Callback.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBodyExpiresIn Method

Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.

Syntax

public string PublishBodyExpiresIn (long expiresIn)

Parameters

expiresIn
The period time in seconds the publication URL has to be available, after that it will expire.

Returns

The file URL.

Exceptions

Type Reason
InvalidOperationException Is thrown when this object is not uploaded in Kii Cloud.
ArgumentException Is thrown when expiresIn <= 0
KiiCorp.Cloud.Storage.NotFoundException Is thrown when Object / Bucket / Bucket owner is not in Kii Cloud.
KiiCorp.Cloud.Storage.UnauthorizedException Is throwns when current user cannot access this KiiObject.

Remarks

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

PublishBodyExpiresIn Method

Publishes the KiiObject attached file and return the file URL. URL will be expired on the specified expire time.

Syntax

public void PublishBodyExpiresIn (long expiresIn, KiiObjectPublishCallback callback)

Parameters

expiresIn
The period time in seconds the publication URL has to be available, after that it will expire.
callback
Callback.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Refresh Method

Get latest KiiObject form KiiCloud and refresh properties.

Syntax

public void Refresh ()

Exceptions

Type Reason
InvalidOperationException Is thrown when this instance doesn't have id or bucket.
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when server sends broken Json.
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

Please call this API to the object created by KiiObject.CreateByUri(Uri)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Refresh Method

Get latest KiiObject form KiiCloud and refresh properties.

Syntax

public void Refresh (KiiObjectCallback callback)

Parameters

callback
Callback.

Remarks

Please call this API to the object created by KiiObject.CreateByUri(Uri)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Save Method

Create or update the KiiObject on KiiCloud.

Syntax

public void Save ()

Remarks

This API uploads only modified fields. This call is same as KiiObject.Save(true)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Save Method

Create or update the KiiObject on KiiCloud.

Syntax

public void Save (KiiObjectCallback callback)

Parameters

callback
Callback.

Remarks

This API uploads only modified fields. This call is same as KiiObject.Save(true)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Save Method

Create or update the KiiObject on KiiCloud.

Syntax

public void Save (bool overWrite)

Parameters

overWrite
Over write.

Remarks

This API uploads only modified fields.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Save Method

Create or update the KiiObject on KiiCloud.

Syntax

public void Save (bool overWrite, KiiObjectCallback callback)

Parameters

overWrite
Over write.
callback
Callback.

Remarks

This API uploads only modified fields.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SaveAllFields Method

Create or update the KiiObject on KiiCloud.

Syntax

public void SaveAllFields (bool overWrite)

Parameters

overWrite
If
Example
false
and object in KiiCloud is updated, KiiCorp.Cloud.Storage.CloudException is thrown.

Remarks

When this API updates object in KiiCloud, object's all fields in KiiCloud are replaced by fields in this instance.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SaveAllFields Method

Create or update the KiiObject on KiiCloud.

Syntax

public void SaveAllFields (bool overWrite, KiiObjectCallback callback)

Parameters

overWrite
If
Example
false
and object in KiiCloud is updated, KiiCorp.Cloud.Storage.CloudException is thrown.
callback
Callback.

Remarks

When this API updates object in KiiCloud, object's all fields in KiiCloud are replaced by fields in this instance.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

SetGeoPoint Method

Sets the geo point to this object with the specified key.

Syntax

public void SetGeoPoint (string key, KiiGeoPoint geoObj)

Parameters

key
Key, name of the field. Must not null or empty string.
geoObj
Geo object to be tied to the specified key. Must not null.

Exceptions

Type Reason
ArgumentException Is thrown when an argument is invalid. Please see parameter explanation.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

UploadBody Method

Upload the body of the KiiObject to KiiCloud.

Syntax

public void UploadBody (string contentType, System.IO.Stream stream)

Parameters

contentType
Content type of body.
stream
The object body to be uploaded. This stream will be closed after execution.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.NotFoundException Is thrown when KiiObject is not in KiiCloud.
KiiCorp.Cloud.Storage.UnauthorizedException Is thrown when current user cannot access this KiiObject.

Remarks

The stream will be closed after execution.

NOTE: This api access to server. Should not be executed in UI/Main thread.

NOTE: After this operation, KiiObject version on cloud will be updated. If you want to use KiiObject.Save(bool) with overwrite=false argument, please do KiiObject.Refresh before saving.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

UploadBody Method

Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.

Syntax

public void UploadBody (string contentType, System.IO.Stream stream, KiiObjectCallback callback)

Parameters

contentType
Content type of body.
stream
The object body to be uploaded.
callback
Callback.

Remarks

The stream will be closed after execution.

NOTE: After this operation, KiiObject version on cloud will be updated. If you want to use KiiObject.Save(bool) with overwrite=false argument, please do KiiObject.Refresh before saving.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

UploadBody Method

Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.

Syntax

public void UploadBody (string contentType, System.IO.Stream stream, KiiObjectCallback callback, KiiObjectBodyProgressCallback progressCallback)

Parameters

contentType
Content type of body.
stream
The object body to be uploaded.
callback
Callback.
progressCallback
This callback will be called when API will tell a progress.

Remarks

KiiObjectBodyProgressCallback doesn't work properly when use KiiInitializeBehaviour in order to initialize the KiiCloudSDK. Use KiiObject.UploadBody(string, System.IO.Stream, KiiObjectCallback, KiiObjectBodyProgressPercentageCallback) instead.

The stream will be closed after execution.

NOTE: After this operation, KiiObject version on cloud will be updated. If you want to use KiiObject.Save(bool) with overwrite=false argument, please do KiiObject.Refresh before saving.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

UploadBody Method

Upload the body of the KiiObject to KiiCloud. This API will be executed asynchronously.

Syntax

public void UploadBody (string contentType, System.IO.Stream stream, KiiObjectCallback callback, KiiObjectBodyProgressPercentageCallback progressCallback)

Parameters

contentType
Content type of body.
stream
The object body to be uploaded.
callback
Callback.
progressCallback
This callback will be called when API will tell a progress.

Remarks

The stream will be closed after execution.

NOTE: After this operation, KiiObject version on cloud will be updated. If you want to use KiiObject.Save(bool) with overwrite=false argument, please do KiiObject.Refresh before saving.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Uri Property

Gets the URI of this instance.

Syntax

public Uri Uri { get; }

Value

The URI of this instance.

Exceptions

Type Reason
InvalidOperationException Is thrown when this object doesn't have ID

Remarks

Format is the following:
  • Application scope object: kiicloud://buckets/{name of bucket}/objects/{id of the object}
  • User scope object: kiicloud://users/{id of the user}/buckets/{name of bucket}/objects/{id of the object}
  • Group scope object: kiicloud://groups/{id of the group}/buckets/{name of bucket}/objects/{id of the object}

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0