java.lang.Object | +--com.ibm.commerce.server.UploadedFile
The UploadedFile is an object that represents an uploaded file.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field |
Constructor Summary | |
---|---|
UploadedFile(java.lang.String filename, java.lang.String type,
MultipartInputStreamHandler in, java.lang.String boundary) uploaded File |
Method Summary | |
---|---|
java.lang.String |
getContentType() Gets the content type for the file |
java.lang.String |
getFileName() Gets the uploaded file name |
java.io.InputStream |
getInputStream() Returns the uploaded file as an input stream. |
int |
getLength() Gets the length of the file |
void |
readAndSaveFile(java.io.File f) Reads in the uploaded file and save it into the given file. |
void |
setContentType(java.lang.String contentType) Sets the contentType |
void |
setFileName(java.lang.String fileName) Sets the fileName |
void |
setLength(int length) Sets the length |
java.lang.String |
toString() toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public UploadedFile(java.lang.String filename, java.lang.String type, MultipartInputStreamHandler in, java.lang.String boundary)
filename
- file name of uploaded filetype
- file type of uploaded fileboundary
- boundary of uplaoded fileMethod Detail |
---|
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public void readAndSaveFile(java.io.File f) throws java.io.IOException
java.io.IOException
public java.lang.String getContentType()
public java.lang.String getFileName()
public int getLength()
public void setLength(int length)
length
- The length to setpublic void setContentType(java.lang.String contentType)
contentType
- The contentType to setpublic java.lang.String toString()
toString
in class java.lang.Object
public void setFileName(java.lang.String fileName)
fileName
- The fileName to set