|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.beans.runtime.Document
public class Document
A wrapper for a temporary uploaded file. User: sameercharles Date: Apr 28, 2003 Time: 11:20:59 AM
Constructor Summary | |
---|---|
Document(java.io.File file,
java.lang.String type)
Used to create a document based on a existing file. |
Method Summary | |
---|---|
void |
delete()
Delete the file, taking care of closing an open input stream. |
java.lang.String |
getAtomName()
Returns the parameter name. |
java.lang.String |
getExtension()
Returns the file extension. |
java.io.File |
getFile()
Returns the uploaded file. |
java.lang.String |
getFileName()
Returns the file name without extension. |
java.lang.String |
getFileNameWithExtension()
Returns the full file name with extension (if existing). |
long |
getLength()
Returns the file length in bytes. |
java.io.InputStream |
getStream()
Returns a stream from the uploaded file. |
java.lang.String |
getType()
Returns the mime type for this file. |
void |
setAtomName(java.lang.String name)
Sets the parameter name. |
void |
setExtension(java.lang.String ext)
|
void |
setExtention(java.lang.String ext)
Deprecated. since 4.1.1 typo in method name - use setExtension instead |
void |
setFile(java.io.File in)
Sets a reference to the uploaded file. |
void |
setFileName(java.lang.String name)
Sets the file name without extension. |
void |
setType(java.lang.String type)
Sets the mime type for this file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Document(java.io.File file, java.lang.String type)
Method Detail |
---|
public void setAtomName(java.lang.String name)
name
- parameter namepublic java.lang.String getAtomName()
public void setFileName(java.lang.String name)
name
- file name without extensionpublic java.lang.String getFileName()
public java.lang.String getFileNameWithExtension()
public void setType(java.lang.String type)
type
- mime typepublic java.lang.String getType()
public void setFile(java.io.File in)
in
- filepublic void setExtention(java.lang.String ext)
ext
- file extensionpublic void setExtension(java.lang.String ext)
public java.lang.String getExtension()
public long getLength()
public java.io.InputStream getStream()
public java.io.File getFile()
public void delete()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |