org.eclipse.jetty.util
类 MultiPartInputStream

java.lang.Object
  继承者 org.eclipse.jetty.util.MultiPartInputStream

public class MultiPartInputStream
extends Object

MultiPartInputStream Handle a MultiPart Mime input stream, breaking it up on the boundary into files and strings.


嵌套类摘要
 class MultiPartInputStream.MultiPart
           
 
字段摘要
static MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
           
protected  MultipartConfigElement _config
           
protected  String _contentType
           
protected  File _contextTmpDir
           
protected  boolean _deleteOnExit
           
protected  InputStream _in
           
protected  MultiMap<String> _parts
           
protected  File _tmpDir
           
 
构造方法摘要
MultiPartInputStream(InputStream in, String contentType, MultipartConfigElement config, File contextTmpDir)
           
 
方法摘要
 void deleteParts()
          Delete any tmp storage for parts, and clear out the parts list.
 Collection<Part> getParsedParts()
          Get the already parsed parts.
 Part getPart(String name)
          Get the named Part.
 Collection<Part> getParts()
          Parse, if necessary, the multipart data and return the list of Parts.
 boolean isDeleteOnExit()
           
protected  void parse()
          Parse, if necessary, the multipart stream.
 void setDeleteOnExit(boolean deleteOnExit)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

__DEFAULT_MULTIPART_CONFIG

public static final MultipartConfigElement __DEFAULT_MULTIPART_CONFIG

_in

protected InputStream _in

_config

protected MultipartConfigElement _config

_contentType

protected String _contentType

_parts

protected MultiMap<String> _parts

_tmpDir

protected File _tmpDir

_contextTmpDir

protected File _contextTmpDir

_deleteOnExit

protected boolean _deleteOnExit
构造方法详细信息

MultiPartInputStream

public MultiPartInputStream(InputStream in,
                            String contentType,
                            MultipartConfigElement config,
                            File contextTmpDir)
参数:
in - Request input stream
contentType - Content-Type header
config - MultipartConfigElement
contextTmpDir - javax.servlet.context.tempdir
方法详细信息

getParsedParts

public Collection<Part> getParsedParts()
Get the already parsed parts.

返回:

deleteParts

public void deleteParts()
                 throws MultiException
Delete any tmp storage for parts, and clear out the parts list.

抛出:
MultiException

getParts

public Collection<Part> getParts()
                          throws IOException,
                                 ServletException
Parse, if necessary, the multipart data and return the list of Parts.

返回:
抛出:
IOException
ServletException

getPart

public Part getPart(String name)
             throws IOException,
                    ServletException
Get the named Part.

参数:
name -
返回:
抛出:
IOException
ServletException

parse

protected void parse()
              throws IOException,
                     ServletException
Parse, if necessary, the multipart stream.

抛出:
IOException
ServletException

setDeleteOnExit

public void setDeleteOnExit(boolean deleteOnExit)

isDeleteOnExit

public boolean isDeleteOnExit()


Copyright © 2013. All Rights Reserved.