public class RenderBinary extends Result
Constructor and Description |
---|
RenderBinary(java.io.File file)
Send a file as the response.
|
RenderBinary(java.io.File file,
java.lang.String name)
Send a file as the response.
|
RenderBinary(java.io.File file,
java.lang.String name,
boolean inline)
Send a file as the response.
|
RenderBinary(java.io.InputStream is,
java.lang.String name)
Send a binary stream as the response
|
RenderBinary(java.io.InputStream is,
java.lang.String name,
boolean inline)
Send a binary stream as the response
|
RenderBinary(java.io.InputStream is,
java.lang.String name,
long length) |
RenderBinary(java.io.InputStream is,
java.lang.String name,
long length,
boolean inline) |
RenderBinary(java.io.InputStream is,
java.lang.String name,
long length,
java.lang.String contentType,
boolean inline) |
RenderBinary(java.io.InputStream is,
java.lang.String name,
java.lang.String contentType,
boolean inline)
Send a binary stream as the response
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Http.Request request,
Http.Response response) |
java.lang.String |
getContentType() |
java.io.File |
getFile() |
long |
getLength() |
java.lang.String |
getName() |
boolean |
isInline() |
getEncoding, setContentTypeIfNotSet
fillInStackTrace
public RenderBinary(java.io.InputStream is, java.lang.String name)
is
- the stream to read fromname
- the name to use as Content-Disposition attachment filenamepublic RenderBinary(java.io.InputStream is, java.lang.String name, long length)
public RenderBinary(java.io.InputStream is, java.lang.String name, boolean inline)
is
- the stream to read fromname
- the name to use as Content-Disposition attachment filenameinline
- true to set the response Content-Disposition to inlinepublic RenderBinary(java.io.InputStream is, java.lang.String name, java.lang.String contentType, boolean inline)
is
- the stream to read fromname
- the name to use as Content-Disposition attachment filenamecontentType
- The content type of the streaminline
- true to set the response Content-Disposition to inlinepublic RenderBinary(java.io.InputStream is, java.lang.String name, long length, java.lang.String contentType, boolean inline)
public RenderBinary(java.io.InputStream is, java.lang.String name, long length, boolean inline)
public RenderBinary(java.io.File file, java.lang.String name)
file
- readable file to send backname
- a name to use as Content-disposition's filenamepublic RenderBinary(java.io.File file)
file
- readable file to send backpublic RenderBinary(java.io.File file, java.lang.String name, boolean inline)
file
- readable file to send backname
- a name to use as Content-disposition's filenameinline
- true to set the response Content-Disposition to inlinepublic void apply(Http.Request request, Http.Response response)
public boolean isInline()
public long getLength()
public java.io.File getFile()
public java.lang.String getName()
public java.lang.String getContentType()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly