play.mvc.results
类 RenderBinary

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 java.lang.RuntimeException
              继承者 play.utils.FastRuntimeException
                  继承者 play.mvc.results.Result
                      继承者 play.mvc.results.RenderBinary
所有已实现的接口:
java.io.Serializable

public class RenderBinary
extends Result

200 OK with application/octet-stream

另请参见:
序列化表格

构造方法摘要
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
 
方法摘要
 void apply(Http.Request request, Http.Response response)
           
 
从类 play.mvc.results.Result 继承的方法
getEncoding, setContentTypeIfNotSet
 
从类 play.utils.FastRuntimeException 继承的方法
fillInStackTrace
 
从类 java.lang.Throwable 继承的方法
getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name)
send a binary stream as the response

参数:
is - the stream to read from
name - the name to use as Content-Diposition attachement filename

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name,
                    long length)

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name,
                    boolean inline)
send a binary stream as the response

参数:
is - the stream to read from
name - the name to use as Content-Diposition attachement filename
inline - true to set the response Content-Disposition to inline

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name,
                    java.lang.String contentType,
                    boolean inline)
send a binary stream as the response

参数:
is - the stream to read from
name - the name to use as Content-Diposition attachement filename
inline - true to set the response Content-Disposition to inline

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name,
                    long length,
                    java.lang.String contentType,
                    boolean inline)

RenderBinary

public RenderBinary(java.io.InputStream is,
                    java.lang.String name,
                    long length,
                    boolean inline)

RenderBinary

public RenderBinary(java.io.File file,
                    java.lang.String name)
Send a file as the response. Content-disposion is set to attachment.

参数:
file - readable file to send back
name - a name to use as Content-disposion's filename

RenderBinary

public RenderBinary(java.io.File file)
Send a file as the response. Content-disposion is set to attachment, name is taken from file's name

参数:
file - readable file to send back

RenderBinary

public RenderBinary(java.io.File file,
                    java.lang.String name,
                    boolean inline)
Send a file as the response. Content-disposion is set to attachment, name is taken from file's name

参数:
file - readable file to send back
方法详细信息

apply

public void apply(Http.Request request,
                  Http.Response response)
指定者:
Result 中的 apply


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly