@RenderWith(value=RawActionResult.class) public class RawData extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
downloadFileName |
protected java.io.InputStream |
inputStream |
protected int |
length |
protected java.lang.String |
mimeType |
Constructor and Description |
---|
RawData(java.io.InputStream inputStream,
int length) |
Modifier and Type | Method and Description |
---|---|
RawData |
as(java.lang.String mimeOrExtension)
Defines mime type by providing real mime type or just extension!
|
RawData |
asHtml() |
RawData |
asText() |
java.io.InputStream |
contentInputStream() |
int |
contentLength() |
RawData |
downloadableAs(java.lang.String downloadFileName)
Defines download file name and mime type from the name extension.
|
java.lang.String |
downloadFileName() |
java.lang.String |
mimeType() |
static RawData |
of(byte[] bytes) |
static RawData |
of(java.io.File file) |
protected final java.io.InputStream inputStream
protected final int length
protected java.lang.String downloadFileName
protected java.lang.String mimeType
public static RawData of(byte[] bytes)
public static RawData of(java.io.File file)
public RawData as(java.lang.String mimeOrExtension)
public RawData asHtml()
public RawData asText()
public RawData downloadableAs(java.lang.String downloadFileName)
public java.io.InputStream contentInputStream()
public java.lang.String mimeType()
public java.lang.String downloadFileName()
public int contentLength()
Copyright © 2003-present Jodd Team