org.eclipse.jetty.util
Class MultiPartInputStream.MultiPart
java.lang.Object
org.eclipse.jetty.util.MultiPartInputStream.MultiPart
- All Implemented Interfaces:
- javax.servlet.http.Part
- Enclosing class:
- MultiPartInputStream
public class MultiPartInputStream.MultiPart
- extends java.lang.Object
- implements javax.servlet.http.Part
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_name
protected java.lang.String _name
_filename
protected java.lang.String _filename
_file
protected java.io.File _file
_out
protected java.io.OutputStream _out
_contentType
protected java.lang.String _contentType
_headers
protected MultiMap<java.lang.String> _headers
_size
protected long _size
MultiPartInputStream.MultiPart
public MultiPartInputStream.MultiPart(java.lang.String name,
java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
setContentType
protected void setContentType(java.lang.String contentType)
open
protected void open()
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
close
protected void close()
throws java.io.IOException
- Throws:
java.io.IOException
write
protected void write(int b)
throws java.io.IOException,
javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
write
protected void write(byte[] bytes,
int offset,
int length)
throws java.io.IOException,
javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
createFile
protected void createFile()
throws java.io.IOException
- Throws:
java.io.IOException
setHeaders
protected void setHeaders(MultiMap<java.lang.String> headers)
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface javax.servlet.http.Part
- See Also:
Part.getContentType()
getHeader
public java.lang.String getHeader(java.lang.String name)
- Specified by:
getHeader
in interface javax.servlet.http.Part
- See Also:
Part.getHeader(java.lang.String)
getHeaderNames
public java.util.Collection<java.lang.String> getHeaderNames()
- Specified by:
getHeaderNames
in interface javax.servlet.http.Part
- See Also:
Part.getHeaderNames()
getHeaders
public java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
- Specified by:
getHeaders
in interface javax.servlet.http.Part
- See Also:
Part.getHeaders(java.lang.String)
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream
in interface javax.servlet.http.Part
- Throws:
java.io.IOException
- See Also:
Part.getInputStream()
getName
public java.lang.String getName()
- Specified by:
getName
in interface javax.servlet.http.Part
- See Also:
Part.getName()
getSize
public long getSize()
- Specified by:
getSize
in interface javax.servlet.http.Part
- See Also:
Part.getSize()
write
public void write(java.lang.String fileName)
throws java.io.IOException
- Specified by:
write
in interface javax.servlet.http.Part
- Throws:
java.io.IOException
- See Also:
Part.write(java.lang.String)
delete
public void delete()
throws java.io.IOException
- Specified by:
delete
in interface javax.servlet.http.Part
- Throws:
java.io.IOException
- See Also:
Part.delete()
getFile
public java.io.File getFile()
- Get the file, if any, the data has been written to.
- Returns:
getContentDispositionFilename
public java.lang.String getContentDispositionFilename()
- Get the filename from the content-disposition.
- Returns:
- null or the filename
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.