Class Raw

java.lang.Object
cool.scx.web.vo.Raw
All Implemented Interfaces:
ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>, BaseVo

public final class Raw extends Object
原始文件 但不需要下载的 vo 比如 pdf 之类
Version:
0.7.0
Author:
scx567888
  • Field Details

    • inputStream

      protected final InputStream inputStream
      输入流
    • path

      protected final Path path
      路径
    • bytes

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

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

      protected final MediaType contentType
      a
    • contentDisposition

      protected final String contentDisposition
      a
  • Method Details

    • of

      public static Raw of(byte[] bytes, FileFormat fileFormat)
    • of

      public static Raw of(Path path)
    • of

      public static Raw of(InputStream inputStream, FileFormat fileFormat)
    • accept

      public final void accept(io.vertx.ext.web.RoutingContext context)
      Specified by:
      accept in interface ScxConsumer<io.vertx.ext.web.RoutingContext,Exception>
    • sendBytes

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

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

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