org.eclipse.jetty.util
Class MultiPartInputStream

java.lang.Object
  extended by org.eclipse.jetty.util.MultiPartInputStream

public class MultiPartInputStream
extends java.lang.Object

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


Nested Class Summary
 class MultiPartInputStream.MultiPart
           
 
Field Summary
static javax.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG
           
protected  javax.servlet.MultipartConfigElement _config
           
protected  java.lang.String _contentType
           
protected  java.io.File _contextTmpDir
           
protected  java.io.InputStream _in
           
protected  MultiMap<java.lang.String> _parts
           
protected  java.io.File _tmpDir
           
 
Constructor Summary
MultiPartInputStream(java.io.InputStream in, java.lang.String contentType, javax.servlet.MultipartConfigElement config, java.io.File contextTmpDir)
           
 
Method Summary
 javax.servlet.http.Part getPart(java.lang.String name)
           
 java.util.Collection<javax.servlet.http.Part> getParts()
           
protected  void parse()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__DEFAULT_MULTIPART_CONFIG

public static final javax.servlet.MultipartConfigElement __DEFAULT_MULTIPART_CONFIG

_in

protected java.io.InputStream _in

_config

protected javax.servlet.MultipartConfigElement _config

_contentType

protected java.lang.String _contentType

_parts

protected MultiMap<java.lang.String> _parts

_tmpDir

protected java.io.File _tmpDir

_contextTmpDir

protected java.io.File _contextTmpDir
Constructor Detail

MultiPartInputStream

public MultiPartInputStream(java.io.InputStream in,
                            java.lang.String contentType,
                            javax.servlet.MultipartConfigElement config,
                            java.io.File contextTmpDir)
Parameters:
in - Request input stream
contentType - Content-Type header
config - MultipartConfigElement
contextTmpDir - javax.servlet.context.tempdir
Method Detail

getParts

public java.util.Collection<javax.servlet.http.Part> getParts()
                                                       throws java.io.IOException,
                                                              javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

getPart

public javax.servlet.http.Part getPart(java.lang.String name)
                                throws java.io.IOException,
                                       javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

parse

protected void parse()
              throws java.io.IOException,
                     javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2012. All Rights Reserved.