程序包 cool.scx.core.vo

类 Download

java.lang.Object
cool.scx.core.vo.Download
所有已实现的接口:
BaseVo, cool.scx.functional.ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>

public final class Download extends Object
文件下载 vo
版本:
1.0.10
作者:
scx567888
  • 字段详细资料

    • inputStream

      protected final InputStream inputStream
      输入流
    • path

      protected final Path path
      路径
    • bytes

      protected final byte[] bytes
      字节数组
    • type

      protected final cool.scx.core.vo.BaseWriter.Type type
      数据来源
    • contentType

      protected final String contentType
      a
    • contentDisposition

      protected final String contentDisposition
      a
  • 方法详细资料

    • of

      public static Download of(InputStream inputStream, String downloadName)
      a
      参数:
      inputStream - a
      downloadName - a
      返回:
      a
    • of

      public static Download of(byte[] bytes, String downloadName)
      a
      参数:
      bytes - a
      downloadName - a
      返回:
      a
    • of

      public static Download of(Path path, String downloadName)
      a
      参数:
      path - a
      downloadName - a
      返回:
      a
    • of

      public static Download of(Path path)
      a
      参数:
      path - a
      返回:
      a
    • accept

      public final void accept(io.vertx.ext.web.RoutingContext context)
      指定者:
      accept 在接口中 cool.scx.functional.ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>
    • sendBytes

      protected void sendBytes(io.vertx.ext.web.RoutingContext context)

      sendBytes.

      参数:
      context - a RoutingContext object
    • sendInputStream

      protected void sendInputStream(io.vertx.ext.web.RoutingContext context)

      sendBytes.

      参数:
      context - a RoutingContext object
    • sendFile

      protected void sendFile(io.vertx.ext.web.RoutingContext context) throws NotFoundException

      sendFile.

      参数:
      context - c
      抛出:
      NotFoundException - if any.