org.eclipse.jetty.util
public class MultiPartInputStream.MultiPart extends java.lang.Object implements javax.servlet.http.Part
| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayOutputStream2 |
_bout |
protected java.lang.String |
_contentType |
protected java.io.File |
_file |
protected java.lang.String |
_filename |
protected MultiMap<java.lang.String> |
_headers |
protected java.lang.String |
_name |
protected java.io.OutputStream |
_out |
protected long |
_size |
| Constructor and Description |
|---|
MultiPartInputStream.MultiPart(java.lang.String name,
java.lang.String filename) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close() |
protected void |
createFile() |
void |
delete() |
byte[] |
getBytes() |
java.lang.String |
getContentDispositionFilename()
Get the filename from the content-disposition.
|
java.lang.String |
getContentType() |
java.io.File |
getFile()
Get the file, if any, the data has been written to.
|
java.lang.String |
getHeader(java.lang.String name) |
java.util.Collection<java.lang.String> |
getHeaderNames() |
java.util.Collection<java.lang.String> |
getHeaders(java.lang.String name) |
java.io.InputStream |
getInputStream() |
java.lang.String |
getName() |
long |
getSize() |
protected void |
open() |
protected void |
setContentType(java.lang.String contentType) |
protected void |
setHeaders(MultiMap<java.lang.String> headers) |
protected void |
write(byte[] bytes,
int offset,
int length) |
protected void |
write(int b) |
void |
write(java.lang.String fileName) |
protected java.lang.String _name
protected java.lang.String _filename
protected java.io.File _file
protected java.io.OutputStream _out
protected ByteArrayOutputStream2 _bout
protected java.lang.String _contentType
protected MultiMap<java.lang.String> _headers
protected long _size
public MultiPartInputStream.MultiPart(java.lang.String name,
java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionprotected void setContentType(java.lang.String contentType)
protected void open()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundExceptionjava.io.IOExceptionprotected void close()
throws java.io.IOException
java.io.IOExceptionprotected void write(int b)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionprotected void write(byte[] bytes,
int offset,
int length)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionprotected void createFile()
throws java.io.IOException
java.io.IOExceptionprotected void setHeaders(MultiMap<java.lang.String> headers)
public java.lang.String getContentType()
getContentType in interface javax.servlet.http.PartPart.getContentType()public java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.PartPart.getHeader(java.lang.String)public java.util.Collection<java.lang.String> getHeaderNames()
getHeaderNames in interface javax.servlet.http.PartPart.getHeaderNames()public java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
getHeaders in interface javax.servlet.http.PartPart.getHeaders(java.lang.String)public java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.http.Partjava.io.IOExceptionPart.getInputStream()public byte[] getBytes()
public java.lang.String getName()
getName in interface javax.servlet.http.PartPart.getName()public long getSize()
getSize in interface javax.servlet.http.PartPart.getSize()public void write(java.lang.String fileName)
throws java.io.IOException
write in interface javax.servlet.http.Partjava.io.IOExceptionPart.write(java.lang.String)public void delete()
throws java.io.IOException
delete in interface javax.servlet.http.Partjava.io.IOExceptionPart.delete()public java.io.File getFile()
public java.lang.String getContentDispositionFilename()
Copyright © 2017. All Rights Reserved.