程序包 cool.scx.mvc.vo

类 Raw

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

public final class Raw extends Object
原始文件 但不需要下载的 vo 比如 pdf 之类
版本:
0.7.0
作者:
scx567888
  • 字段详细资料

    • inputStream

      protected final InputStream inputStream
      输入流
    • path

      protected final Path path
      路径
    • bytes

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

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

      protected final String contentType
      a
    • contentDisposition

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

    • of

      public static Raw of(byte[] bytes, RawType rawType)
      a
      参数:
      bytes - a
      rawType - a
      返回:
      a
    • of

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

      public static Raw of(InputStream inputStream, RawType rawType)
      a
      参数:
      inputStream - a
      rawType - a
      返回:
      a
    • accept

      public final void accept(io.vertx.ext.web.RoutingContext context)
      指定者:
      accept 在接口中 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.