Package cool.scx.web.vo
Class Raw
java.lang.Object
cool.scx.web.vo.Raw
- All Implemented Interfaces:
ScxConsumer<io.vertx.ext.web.RoutingContext,,Exception> BaseVo
原始文件 但不需要下载的 vo 比如 pdf 之类
- Version:
- 0.7.0
- Author:
- scx567888
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]字节数组protected final Stringaprotected final MediaTypeaprotected final InputStream输入流protected final Path路径protected final cool.scx.web.vo.BaseWriter.Type数据来源 -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaccept(io.vertx.ext.web.RoutingContext context) static Rawof(byte[] bytes, FileFormat fileFormat) static Rawof(InputStream inputStream, FileFormat fileFormat) static Rawprotected voidsendBytes(io.vertx.ext.web.RoutingContext context) protected voidsendFile(io.vertx.ext.web.RoutingContext context) protected voidsendInputStream(io.vertx.ext.web.RoutingContext context)
-
Field Details
-
inputStream
输入流 -
path
路径 -
bytes
protected final byte[] bytes字节数组 -
type
protected final cool.scx.web.vo.BaseWriter.Type type数据来源 -
contentType
a -
contentDisposition
a
-
-
Method Details
-
of
-
of
-
of
-
accept
public final void accept(io.vertx.ext.web.RoutingContext context) - Specified by:
acceptin interfaceScxConsumer<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
- Throws:
NotFoundException
-