|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kom.tools.web.Upload
Uploaded data from the Client
Field Summary | |
protected java.lang.String |
cid
|
protected java.lang.String |
desc
|
protected java.lang.String |
extra
|
protected java.lang.String |
fileName
|
protected long |
id
|
protected java.lang.String |
mimeType
|
(package private) static java.lang.String |
prefix
|
protected java.lang.String |
tmpDir
|
protected java.io.File |
tmpFile
|
protected java.lang.String |
tmpName
|
protected java.lang.String |
uid
|
Constructor Summary | |
Upload(java.lang.String fileName,
java.lang.String mimeType,
java.lang.String tmpDir,
long id)
Constructor |
Method Summary | |
java.lang.String |
fileName()
Gets the path of the original file |
void |
finalize()
Removes the temporary file by finalization |
java.lang.String |
getContentId()
Gets a Content-Id of the uploaded data |
java.io.InputStream |
getContents()
Gets contents as an InputStream |
java.lang.String |
getDescription()
Gets contentDescription |
java.lang.String |
getExtra()
Gets extra data |
long |
getId()
Gets the id of the uploaded data |
(package private) java.io.OutputStream |
getOutputStream()
Gets the output stream (enables writing) |
java.lang.String |
getUid()
Gets user id (uid) |
protected void |
handleName()
Removes directory path from the file name. |
java.lang.String |
mimeType()
Gets Content-Type |
void |
setContentId(java.lang.String s)
Sets cid (Content-Id value) |
void |
setDescription(java.lang.String s)
Sets contentDescription |
void |
setExtra(java.lang.String s)
Sets extra data |
void |
setFileName(java.lang.String fn)
Sets the client file path |
void |
setMIMEType(java.lang.String mime)
Sets the MIME type |
void |
setUid(java.lang.String s)
Sets uid |
boolean |
store(java.lang.String dataDir,
java.lang.String fileName)
Stores the data in a temporary file |
java.io.File |
tempFile()
|
java.lang.String |
toString()
Converts the data to a String Should be used only for small files |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String fileName
protected java.lang.String mimeType
protected java.lang.String desc
protected java.lang.String extra
protected java.lang.String tmpDir
protected long id
protected java.lang.String cid
protected java.lang.String uid
protected java.lang.String tmpName
protected java.io.File tmpFile
static final java.lang.String prefix
Constructor Detail |
public Upload(java.lang.String fileName, java.lang.String mimeType, java.lang.String tmpDir, long id)
fileName
- File path on the client sidemimeType
- MIME type (Content-Type) stringtmpDir
- Directory for temporary file(s)id
- Unique id noMethod Detail |
public java.io.File tempFile()
protected void handleName()
public void setFileName(java.lang.String fn)
file
- path (client side)public void setDescription(java.lang.String s)
s
- Valuepublic void setContentId(java.lang.String s)
s
- Valuepublic void setUid(java.lang.String s)
s
- Valuepublic void setExtra(java.lang.String s)
s
- Valuepublic void setMIMEType(java.lang.String mime)
mime
- New MIME type (no action if null)java.io.OutputStream getOutputStream()
public java.io.InputStream getContents()
public java.lang.String toString()
public long getId()
public java.lang.String getContentId()
public java.lang.String mimeType()
public java.lang.String fileName()
public java.lang.String getDescription()
public java.lang.String getExtra()
public java.lang.String getUid()
public void finalize()
public boolean store(java.lang.String dataDir, java.lang.String fileName)
dataDir
- Destination directoryfileName
- Destination file name
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |