目录

The ArchiveDetails class operates an archive file.

Public Method Summary

Return

Method

abstract boolean

update(int dstOffset, byte[]   content, int srcOffset, int count)

Modifies an archive file.

abstract byte[]

get()

Reads an archive file.

abstract void

set(byte[] content)

Writes into an archive file.

Public Methods

public abstract boolean update(int dstOffset, byte[] content, int srcOffset, int count)

Modifies an archive file. The modified archive file is saved in the local cache and is not uploaded to Huawei game server until the archive is submitted.

Note: This method will not override the entire content of the file. If the written data is less than the original data in the archive file, the excess data is retained. To override the original archive file, use the set method.

Input Parameters

Parameter Name

Parameter Description

dstOffset

Position in the target archive file for writing data to. The value 0 indicates the head of a file.

content

Data to write into the file. The content in the archive file will be overridden by the data in content.

srcOffset

Position in the source file for writing data from.

count

Number of bytes to write to an archive file.

Return Values

Type

Description

boolean

Indicates whether the modification is successful.

  • true: yes

  • false: no

public abstract byte[] get()

Reads an archive file.

Return Values

Type

Description

byte[]

Byte data of an archive file.

public abstract void set(byte[] content)

Writes specified data to an archive file. The archive file after data is written is saved in the local cache and is not uploaded to Huawei game server until the archive is submitted.

Input Parameters

Parameter Name

Parameter Description

content

Byte data to write to an archive file.