All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rt.web.util.io.IOFace Maven / Gradle / Ivy

The newest version!
package com.rt.web.util.io;

import com.rt.web.beans.IOItem;


/**
 * io 接口
 */
public interface IOFace {

    /**
     * 签名网址
     *
     * @param bucketName bucketName
     * @param name name
     * @param minutes minutes
     * @return String
     */
    public String generateGetSignedUrl(String bucketName, String name, long minutes);

    /**
     * 获取文件
     *
     * @param bucketName bucketName
     * @param name       name
     * @return IOItem
     */
    public IOItem get(String bucketName, String name);

    /**
     * 保存文件
     *
     * @param bucketName    bucketName
     * @param name          name
     * @param contentType   contentType
     * @param fileByteArray fileByteArray
     * @return String
     * @throws Exception Exception
     */
    public String save(String bucketName, String name, String contentType,
                       byte[] fileByteArray) throws Exception;

    /**
     * 更新文件
     *
     * @param bucketName    bucketName
     * @param name          name
     * @param offset        offset
     * @param fileByteArray fileByteArray
     * @return boolean
     * @throws Exception Exception
     */
    public boolean writer(String bucketName, String name,
                          int offset, byte[] fileByteArray) throws Exception;

    /**
     * 删除文件
     *
     * @param bucketName bucketName
     * @param name       name
     * @return boolean
     */
    public boolean delete(String bucketName, String name);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy