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