public class DownloadParameter extends UploadAckParameter implements IObjectByteArray
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
blockNumber
数据块编号,5个字节,范围00000-99999
|
protected EFileBlockType |
blockType
数据块类型,2个字节
|
protected EDestinationFileSystem |
destinationFileSystem
目标文件系统,1个字节
|
protected byte[] |
errorCode
未知字节,2个字节
|
protected String |
fileIdentifier
文件id,1个字节
|
protected int |
fileNameLength
文件名长度,1个字节
|
protected long |
id
下载的Id,4个字节(没用)
|
errorStatus, moreDataFollowingfunctionCode| 构造器和说明 |
|---|
DownloadParameter() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
byteArrayLength()
获取字节数组长度
|
static DownloadParameter |
createDefault(EFileBlockType blockType,
int blockNumber,
EDestinationFileSystem destinationFileSystem,
boolean moreDataFollowing)
创建默认的下载中参数
|
static DownloadParameter |
fromBytes(byte[] data)
字节数组数据解析
|
static DownloadParameter |
fromBytes(byte[] data,
int offset)
字节数组数据解析
|
byte[] |
toByteArray()
转换为字节数组
|
protected byte[] errorCode
protected long id
protected int fileNameLength
protected String fileIdentifier
protected EFileBlockType blockType
protected int blockNumber
protected EDestinationFileSystem destinationFileSystem
public static DownloadParameter fromBytes(byte[] data)
data - 字节数组数据public static DownloadParameter fromBytes(byte[] data, int offset)
data - 字节数组数据offset - 偏移量public static DownloadParameter createDefault(EFileBlockType blockType, int blockNumber, EDestinationFileSystem destinationFileSystem, boolean moreDataFollowing)
blockType - 数据块类型blockNumber - 数据块编号destinationFileSystem - 目标文件系统moreDataFollowing - 是否有更多数据public int byteArrayLength()
IObjectByteArraybyteArrayLength 在接口中 IObjectByteArraybyteArrayLength 在类中 UploadAckParameterpublic byte[] toByteArray()
IObjectByteArraytoByteArray 在接口中 IObjectByteArraytoByteArray 在类中 UploadAckParameterCopyright © 2024. All rights reserved.