Class Download
java.lang.Object
cool.scx.web.vo.Download
- All Implemented Interfaces:
cool.scx.function.Function1Void<cool.scx.http.routing.RoutingContext, Exception>, BaseVo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]protected final Stringprotected final cool.scx.http.media_type.MediaTypeprotected final InputStreamprotected final Pathprotected final cool.scx.web.vo.BaseWriter.Type -
Method Summary
Modifier and TypeMethodDescriptionfinal voidapply(cool.scx.http.routing.RoutingContext context) static cool.scx.http.ScxHttpServerResponsefillContentType(cool.scx.http.ScxHttpServerResponse response, cool.scx.http.media_type.MediaType contentType) static Downloadstatic Downloadof(InputStream inputStream, String downloadName) static Downloadstatic Download
-
Field Details
-
inputStream
-
path
-
bytes
protected final byte[] bytes -
type
protected final cool.scx.web.vo.BaseWriter.Type type -
contentType
protected final cool.scx.http.media_type.MediaType contentType -
contentDisposition
-
-
Method Details
-
of
-
of
-
of
-
of
-
fillContentType
public static cool.scx.http.ScxHttpServerResponse fillContentType(cool.scx.http.ScxHttpServerResponse response, cool.scx.http.media_type.MediaType contentType) -
apply
public final void apply(cool.scx.http.routing.RoutingContext context) - Specified by:
applyin interfacecool.scx.function.Function1Void<cool.scx.http.routing.RoutingContext, Exception>
-