Class SessionMultipartItem
java.lang.Object
fr.paris.lutece.plugins.genericattributes.service.upload.SessionMultipartItem
- All Implemented Interfaces:
fr.paris.lutece.portal.service.upload.MultipartItem,Serializable
public class SessionMultipartItem
extends Object
implements fr.paris.lutece.portal.service.upload.MultipartItem, Serializable
Uploaded file kept in the HTTP session. The file stays where the upload put it (usually a temporary file).
- One instance: its content is only copied when the session is serialized.
- Several instances (
IUploadedFileStore.isActive()): its content is written once, at upload, to the store shared by the instances, and the session only keeps its id. The session is written to the shared session store after each request that reads it: the file is not written again each time.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSessionMultipartItem(fr.paris.lutece.portal.service.upload.MultipartItem item) Constructor -
Method Summary
-
Constructor Details
-
SessionMultipartItem
public SessionMultipartItem(fr.paris.lutece.portal.service.upload.MultipartItem item) Constructor- Parameters:
item- the uploaded item
-
-
Method Details
-
of
public static fr.paris.lutece.portal.service.upload.MultipartItem of(fr.paris.lutece.portal.service.upload.MultipartItem item) Wraps an item unless it is already kept in the session- Parameters:
item- the item- Returns:
- the item to keep in the session
-
getFieldName
- Specified by:
getFieldNamein interfacefr.paris.lutece.portal.service.upload.MultipartItem
-
getName
- Specified by:
getNamein interfacefr.paris.lutece.portal.service.upload.MultipartItem
-
getContentType
- Specified by:
getContentTypein interfacefr.paris.lutece.portal.service.upload.MultipartItem
-
getSize
public long getSize()- Specified by:
getSizein interfacefr.paris.lutece.portal.service.upload.MultipartItem
-
getInputStream
- Specified by:
getInputStreamin interfacefr.paris.lutece.portal.service.upload.MultipartItem- Throws:
IOException
-
get
- Specified by:
getin interfacefr.paris.lutece.portal.service.upload.MultipartItem- Throws:
UncheckedIOException
-
delete
- Specified by:
deletein interfacefr.paris.lutece.portal.service.upload.MultipartItem- Throws:
IOException
-