Package com.isomorphic.servlet
Class ISCFileItem
java.lang.Object
com.isomorphic.servlet.ISCFileItem
- All Implemented Interfaces:
org.apache.commons.fileupload2.core.FileItem<ISCFileItem>
,org.apache.commons.fileupload2.core.FileItemHeadersProvider<ISCFileItem>
public class ISCFileItem extends Object implements org.apache.commons.fileupload2.core.FileItem<ISCFileItem>
This class is based on the Apache Commons FileUpload FileItem class, providing uploaded file APIs for the SmartClient Server.
-
Method Details
-
get
public byte[] get()- Returns:
- bytes of the uploaded file
-
getInputStream
This method always returns the InputStream associated with the originally uploaded file. This is not necessarily the same object as that returned by DSRequest.getUploadedFileStream(), because that method can be influenced by user code setting the value of a field in the values map to a different InputStream. Eg, if the request contains an uploaded file for a field called "myField", user code in a DMI or custom DataSource could do something like this to override the stream processed by the server:InputStream newStream = someFunctionThatReturnsAnInputStream(); dsRequest.getValues().put("myField", newStream);
- Returns:
- uploaded file an InputStream
- See Also:
-
getSize
public long getSize()- Returns:
- size of the uploaded file in bytes
-
getFileName
- Returns:
- filename as it appears in the upload field on the client (typically includes full path to file on the user's machine)
-