org.nervousync.beans.xml.files.SegmentationInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils-jdk11 Show documentation
Show all versions of utils-jdk11 Show documentation
Java utility collections, development by Nervousync Studio (NSYC)
/*
* Licensed to the Nervousync Studio (NSYC) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nervousync.beans.xml.files;
import org.nervousync.beans.core.BeanObject;
import jakarta.xml.bind.annotation.*;
import java.util.List;
/**
* Segment Data Information Define
* 分割数据信息定义
*
* @author Steven Wee [email protected]
* @version $Revision: 1.0.0 $ $Date: Jun 9, 2015 09:43:23 $
*/
@XmlType(name = "segment_info", namespace = "https://nervousync.org/schemas/segment")
@XmlRootElement(name = "segment_info", namespace = "https://nervousync.org/schemas/segment")
@XmlAccessorType(XmlAccessType.NONE)
public final class SegmentationInfo extends BeanObject {
/**
* Serial version UID
* 序列化UID
*/
private static final long serialVersionUID = 2885564700967742489L;
/**
* Total data size
* 数据大小
*/
@XmlElement(name = "total_size")
private long totalSize;
/**
* Block data size
* 数据块大小
*/
@XmlElement(name = "block_size")
private int blockSize;
/**
* File extension name
* 文件扩展名
*/
@XmlElement(name = "ext_name")
private String extName;
/**
* Block data identified value of SHA256
* 数据块验证值,使用SHA256
*/
@XmlElement(name = "signature_sha")
private String sha;
/**
* Block data list
* 数据块列表
*/
@XmlElementWrapper(name = "block_list")
@XmlElement(name = "segment_block")
private List blockList;
/**
* Default constructor for SegmentationInfo
* SegmentationInfo的默认构造函数
*/
public SegmentationInfo() {
}
/**
* Constructor for SegmentationInfo
* Using given extension name, total size, block size, identified value and block list
* SegmentationInfo的构造函数
* 使用给定的文件扩展名,数据大小,文件验证码以及数据块列表
*
* @param extName File extension name
* 文件扩展名
* @param totalSize Total data size
* 数据大小
* @param blockSize Block data size
* 数据块大小
* @param sha Block data identified value of SHA256
* 数据块验证值,使用SHA256
* @param blockList Block data list
* 数据块列表
*/
public SegmentationInfo(String extName, long totalSize, int blockSize, String sha,
List blockList) {
this.extName = extName;
this.totalSize = totalSize;
this.blockSize = blockSize;
this.sha = sha;
this.blockList = blockList;
}
/**
* Getter method for total data size
* 数据大小的Getter方法
*
* @return Total data size
* 数据大小
*/
public long getTotalSize() {
return totalSize;
}
/**
* Getter method for block size
* 数据块长度的Getter方法
*
* @return Block data size
* 数据块大小
*/
public int getBlockSize() {
return blockSize;
}
/**
* Getter method for file extension name
* 文件扩展名的Getter方法
*
* @return File extension name
* 文件扩展名
*/
public String getExtName() {
return extName;
}
/**
* Getter method for identified value
* 数据块验证值的Getter方法
*
* @return Block data identified value of SHA256
* 数据块验证值,使用SHA256
*/
public String getSha() {
return sha;
}
/**
* Getter method for block data list
* 数据块列表的Getter方法
*
* @return Block data list
* 数据块列表
*/
public List getBlockList() {
return blockList;
}
}