|
||||||||||
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(File file,
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. |
String |
getAtomName()
Returns the parameter name. |
String |
getExtension()
Returns the file extension. |
File |
getFile()
Returns the uploaded file. |
String |
getFileName()
Returns the file name without extension. |
String |
getFileNameWithExtension()
Returns the full file name with extension (if existing). |
long |
getLength()
Returns the file length in bytes. |
InputStream |
getStream()
Returns a stream from the uploaded file. |
String |
getType()
Returns the mime type for this file. |
void |
setAtomName(String name)
Sets the parameter name. |
void |
setExtension(String ext)
|
void |
setFile(File in)
Sets a reference to the uploaded file. |
void |
setFileName(String name)
Sets the file name without extension. |
void |
setType(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(File file, String type)
Method Detail |
---|
public void setAtomName(String name)
name
- parameter namepublic String getAtomName()
public void setFileName(String name)
name
- file name without extensionpublic String getFileName()
public String getFileNameWithExtension()
public void setType(String type)
type
- mime typepublic String getType()
public void setFile(File in)
in
- filepublic void setExtension(String ext)
public String getExtension()
public long getLength()
public InputStream getStream()
public File getFile()
public void delete()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |