|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.util.upload.OwMultiPart
public class OwMultiPart
A FilePart is an upload part, which represents an input type = "file" form parameter.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor Summary | |
---|---|
OwMultiPart(String name_p,
javax.servlet.ServletInputStream in_p,
String boundary_p,
String contentType_p,
String fileName_p,
String filePath_p)
Construct a file part |
Method Summary | |
---|---|
String |
getContentType()
Returns the content type of the file data contained within. |
String |
getFileName()
Returns the name that the file was stored with on the remote system, or null if the user didn't enter a file to be uploaded. |
String |
getFilePath()
Returns the full path and name of the file on the remote system, or null if the user didn't enter a file to be uploaded. |
InputStream |
getInputStream()
Returns an input stream which contains the contents of the file supplied. |
String |
getName()
Returns the name of the form element that this Part corresponds to. |
boolean |
isFile()
Returns true if this Part is a FilePart. |
long |
writeTo(File fileOrDirectory_p,
String fileName_p)
Write this file part to a file or directory. |
long |
writeTo(OutputStream out_p)
Write this file part to the given output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OwMultiPart(String name_p, javax.servlet.ServletInputStream in_p, String boundary_p, String contentType_p, String fileName_p, String filePath_p) throws IOException
name_p
- String - the name of the parameter.in_p
- ServletInputStream - the servlet input stream to read the file from.boundary_p
- String - the MIME boundary that delimits the end of file.contentType_p
- String - the content type of the file provided in the MIME header.fileName_p
- String - the file system name of the file provided in the MIME header.filePath_p
- String - the file system path of the file provided in the MIME header
(as specified in disposition info).
IOException
- if an input or output exception has occurred.Method Detail |
---|
public String getName()
public String getFileName()
null
if the user didn't enter a file to be uploaded.
null
.public String getFilePath()
null
if the user didn't enter a file to be uploaded.
null
.public String getContentType()
public InputStream getInputStream()
0
bytes
in the input stream.
public long writeTo(File fileOrDirectory_p, String fileName_p) throws IOException
fileName_p
- name of the uploaded filefileOrDirectory_p
- File/Dir to which data will be written
IOException
- if an input or output exception is occurred.public long writeTo(OutputStream out_p) throws IOException
out_p
- OutputStream to which data will be written
IOException
- if an input or output exception is occurred.public boolean isFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |