Package cool.scx.web.vo
Class Download
java.lang.Object
cool.scx.web.vo.Download
- All Implemented Interfaces:
ScxConsumer<io.vertx.ext.web.RoutingContext,,Exception> BaseVo
文件下载 vo
- Version:
- 1.0.10
- 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 Downloadstatic Downloadof(InputStream inputStream, String downloadName) static Downloadstatic Downloadprotected 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
-
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
-