public class SessionFile
extends org.apache.commons.fileupload.disk.DiskFileItem
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
SessionFile.MimeType |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
buildTempFile() |
static java.io.File |
buildTempFile(byte[] content,
java.lang.String extension) |
static java.io.File |
buildTempFile(java.lang.String extension) |
static SessionFile |
createSessionFile(java.lang.String fileName,
java.lang.String contentType,
byte[] bytes)
Cria o arquivo utilizando o commons-fileupload, economizando assim memória, caso o arquivo seja muito grande.
|
static SessionFile |
createSessionFile(java.lang.String fileName,
java.lang.String contentType,
java.io.File file)
Cria o arquivo utilizando o commons-fileupload, economizando assim memória, caso o arquivo seja muito grande.
|
static java.io.File |
getTempViewerFileDir() |
boolean |
isCanSendViaEmail() |
void |
setCanSendViaEmail(boolean canSend)
Permite o envio desse arquivo por e-mail ao visualizar-lo no browser
|
delete, get, getCharSet, getContentType, getFieldName, getHeaders, getInputStream, getName, getOutputStream, getSize, getStoreLocation, getString, getString, isFormField, isInMemory, setFieldName, setFormField, setHeaders, toString, write
public void setCanSendViaEmail(boolean canSend) throws java.lang.Exception
key
- java.lang.Exception
public boolean isCanSendViaEmail()
public static SessionFile createSessionFile(java.lang.String fileName, java.lang.String contentType, byte[] bytes) throws java.io.IOException
fileName
- contentType
- bytes
- ctx
- java.io.IOException
public static SessionFile createSessionFile(java.lang.String fileName, java.lang.String contentType, java.io.File file) throws java.io.IOException
fileName
- contentType
- bytes
- ctx
- java.io.IOException
public static java.io.File buildTempFile(byte[] content, java.lang.String extension) throws java.lang.Exception
java.lang.Exception
public static java.io.File buildTempFile() throws java.lang.Exception
java.lang.Exception
public static java.io.File buildTempFile(java.lang.String extension) throws java.lang.Exception
java.lang.Exception
public static java.io.File getTempViewerFileDir()