Package com.microstrategy.web.platform
Interface PostedFile
-
- All Known Implementing Classes:
MultipartRequest.File
public interface PostedFileThePostedFileinterface represents an uploaded file from the client side. Usually uploading a file requires to send aMultipartRequestto the Web server.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()Gets a Stream object which points to an uploaded file to prepare for reading the contents of the file.longgetLength()Returns the size in bytes of an uploaded file.java.lang.StringgetName()Returns the fully-qualified name of the file on the client's computer (for example "C:\MyFiles\Test.txt").java.lang.StringgetType()Returns the MIME content type of a file sent by a client.voidrelease()Releases any resources held by this After callingreleasethis object is not valid anymore.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the fully-qualified name of the file on the client's computer (for example "C:\MyFiles\Test.txt").- Returns:
- the fully-qualified name of the file on the client's computer
-
getType
java.lang.String getType()
Returns the MIME content type of a file sent by a client.- Returns:
- the MIME content type of a file sent by a client.
-
getLength
long getLength()
Returns the size in bytes of an uploaded file.- Returns:
- the size in bytes of an uploaded file.
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionGets a Stream object which points to an uploaded file to prepare for reading the contents of the file.- Returns:
- a Stream object
- Throws:
java.io.IOException- thrown if the InputStream can not be obtained.
-
release
void release() throws java.io.IOExceptionReleases any resources held by this After callingreleasethis object is not valid anymore.- Throws:
java.io.IOException- if an error occurs while closing any opened streams or deleting the temporary file
-
-