Class Raw

java.lang.Object
cool.scx.web.vo.Raw
All Implemented Interfaces:
cool.scx.common.functional.ScxConsumer<cool.scx.http.routing.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 cool.scx.http.MediaType contentType
    • contentDisposition

      protected final String contentDisposition
  • Method Details

    • of

      public static Raw of(byte[] bytes, cool.scx.http.FileFormat fileFormat)
    • of

      public static Raw of(Path path)
    • of

      public static Raw of(InputStream inputStream, cool.scx.http.FileFormat fileFormat)
    • fillContentType

      public static cool.scx.http.ScxHttpServerResponse fillContentType(cool.scx.http.ScxHttpServerResponse response, cool.scx.http.MediaType contentType)
    • accept

      public final void accept(cool.scx.http.routing.RoutingContext context)
      Specified by:
      accept in interface cool.scx.common.functional.ScxConsumer<cool.scx.http.routing.RoutingContext,Exception>