|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jspsmart.upload.File
An abstract representation of an uploaded file. This is a dependant object wich can't be directly instantiate.
Field Summary | |
static int |
SAVEAS_AUTO
|
static int |
SAVEAS_PHYSICAL
|
static int |
SAVEAS_VIRTUAL
|
Method Summary | |
void |
fileToField(java.sql.ResultSet rs,
java.lang.String columnName)
Save the file in a field of a database. |
byte |
getBinaryData(int index)
Returns the byte corresponding to the table index containing the transmitted data. |
java.lang.String |
getContentDisp()
Returns the content disposition. |
java.lang.String |
getContentString()
Returns the full content. |
java.lang.String |
getContentType()
Returns the content type. |
java.lang.String |
getFieldName()
Returns the field's name of the HTML form. |
java.lang.String |
getFileExt()
Returns the file's extension. |
java.lang.String |
getFileName()
Returns the file's name. |
java.lang.String |
getFilePathName()
Returns the full path of the file. |
int |
getSize()
Returns the file's size. |
java.lang.String |
getSubTypeMIME()
Returns the sub type mime. |
java.lang.String |
getTypeMIME()
Returns the MIME Type. |
boolean |
isMissing()
Test if a file is present. |
void |
saveAs(java.lang.String destFilePathName)
Save the file to the specified destination. |
void |
saveAs(java.lang.String destFilePathName,
int optionSaveAs)
Save the file to the specified destination. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int SAVEAS_AUTO
public static final int SAVEAS_VIRTUAL
public static final int SAVEAS_PHYSICAL
Method Detail |
public void saveAs(java.lang.String destFilePathName) throws java.io.IOException, SmartUploadException
destFilePathName
- the destination file namepublic void saveAs(java.lang.String destFilePathName, int optionSaveAs) throws java.io.IOException, SmartUploadException
destFilePathName
- The destination file name.optionSaveAs
- 0 : The method save in a virtual if it exists
else consider the path as a physical if the
porperty denyPhysicalPath is false.
1 : The method save the file only if the path is
a virtual path.
2 : The method save the file only if the path is
a physical path.public void fileToField(java.sql.ResultSet rs, java.lang.String columnName) throws javax.servlet.ServletException, java.io.IOException, SmartUploadException, java.sql.SQLException
rs
- the resulset to updatecolumnName
- the destination columnpublic boolean isMissing()
public java.lang.String getFieldName()
public java.lang.String getFileName()
public java.lang.String getFilePathName()
public java.lang.String getFileExt()
public java.lang.String getContentType()
public java.lang.String getContentDisp()
public java.lang.String getContentString()
public java.lang.String getTypeMIME() throws java.io.IOException
public java.lang.String getSubTypeMIME()
public int getSize()
public byte getBinaryData(int index)
index
- index of the Table
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |