类 Download

java.lang.Object
com.sh.javax.download.Download

public class Download extends Object

Title: 信息化平台 - 文件下载

Description: 信息化平台,包括OA、ERP、CRM、HRM等的综合性平台

Company:首亨软件(重庆)有限公司

Author:江兴春

  • 字段详细资料

    • log4j

      protected org.apache.logging.log4j.Logger log4j
  • 构造器详细资料

    • Download

      public Download(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • Download

      public Download(OutputStream os)
    • Download

      public Download()
  • 方法详细资料

    • setFileSize

      public void setFileSize(int size)
    • setContentType

      public void setContentType(String contentType)
      设置文件类型
      参数:
      contentType - 文件类型
    • setFileName

      public void setFileName(String fileName)
      设置文件名
      参数:
      fileName - 文件名
    • download

      public boolean download(InputStream inputStream) throws IOException
      下载文件
      参数:
      inputStream - InputStream
      抛出:
      IOException - IOException
    • download

      public boolean download(InputStream inputStream, String charset)
      下载文件
      参数:
      inputStream - 输入流
      charset - 字符
    • download

      public boolean download(InputStream inputStream, boolean isPic)
      下载文件
      参数:
      inputStream - 输入流
      isPic - 是否图片
    • download

      public boolean download(InputStream inputStream, boolean isPic, String charset)
    • downloadAsResponse

      public boolean downloadAsResponse(InputStream inputStream, boolean isPic, String charset)
      下载文件
      参数:
      inputStream - 输入流
      isPic - boolean
      charset - String
    • downloadAsOutputStream

      public boolean downloadAsOutputStream(InputStream inputStream)
      下载文件
      参数:
      inputStream - 输入流
    • downloadAsResServer

      public boolean downloadAsResServer(InputStream inputStream, String resPath)
    • downloadAsResServer

      public boolean downloadAsResServer(InputStream inputStream, String resPath, boolean forceUpload)
      下载文件
      参数:
      inputStream - 输入流
      resPath - String
      forceUpload - 图片存在时是否取消上传,默认:true
    • close

      public void close()
    • downloadAsResServer

      public boolean downloadAsResServer(InputStream inputStream, String resPath, boolean forceUpload, DownloadAsResCallback_I callback)
    • download

      public boolean download(String filePath) throws IOException
      抛出:
      IOException
    • downloadAsResServer

      public boolean downloadAsResServer(String filePath, String resPath)
    • downloadAsResServer

      public boolean downloadAsResServer(String filePath, String resPath, boolean forceUpload)
      下载文件后上传到资源服务器
      参数:
      filePath - String
      resPath - String
      forceUpload - boolean
    • downloadAsResServer

      public boolean downloadAsResServer(String filePath, String resPath, boolean forceUpload, DownloadAsResCallback_I callback)
    • download

      public boolean download(String filePath, String charset)
    • isTranserAmr2Mp3

      public boolean isTranserAmr2Mp3()
    • setTranserAmr2Mp3

      public void setTranserAmr2Mp3(boolean transerAmr2Mp3)