org.dspace.app.xmlui.cocoon.servlet.multipart
Class DSpaceMultipartParser
java.lang.Object
org.dspace.app.xmlui.cocoon.servlet.multipart.DSpaceMultipartParser
public class DSpaceMultipartParser
- extends Object
This class is used to implement a multipart request wrapper.
It will parse the http post stream and and fill its hashtable with values.
This class has been adjusted by DSpace to allow the uploading of files with an = sign in it
The hashtable will contain:
Vector: inline part values
FilePart: file part
- Version:
- $Id: MultipartParser.java 638211 2008-03-18 04:41:23Z joerg $
|
Constructor Summary |
DSpaceMultipartParser(boolean saveUploadedFilesToDisk,
File uploadDirectory,
boolean allowOverwrite,
boolean silentlyRename,
int maxUploadSize,
String characterEncoding)
Constructor, parses given request |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UPLOAD_STATUS_SESSION_ATTR
public static final String UPLOAD_STATUS_SESSION_ATTR
- See Also:
- Constant Field Values
DSpaceMultipartParser
public DSpaceMultipartParser(boolean saveUploadedFilesToDisk,
File uploadDirectory,
boolean allowOverwrite,
boolean silentlyRename,
int maxUploadSize,
String characterEncoding)
- Constructor, parses given request
- Parameters:
saveUploadedFilesToDisk - Write fileparts to the uploadDirectory. If true the corresponding object
in the hashtable will contain a FilePartFile, if false a FilePartArrayuploadDirectory - The directory to write to if saveUploadedFilesToDisk is true.allowOverwrite - Allow existing files to be overwritten.silentlyRename - If file exists rename file (using filename+number).maxUploadSize - The maximum content length accepted.characterEncoding - The character encoding to be used.
getParts
public Hashtable getParts(int contentLength,
String contentType,
InputStream requestStream)
throws IOException,
org.apache.cocoon.servlet.multipart.MultipartException
- Throws:
IOException
org.apache.cocoon.servlet.multipart.MultipartException
getParts
public Hashtable getParts(javax.servlet.http.HttpServletRequest request)
throws IOException,
org.apache.cocoon.servlet.multipart.MultipartException
- Throws:
IOException
org.apache.cocoon.servlet.multipart.MultipartException
Copyright © 2012 DuraSpace. All Rights Reserved.