Partpublic class MultiPartFormInputStream.MultiPart extends java.lang.Object implements Part
| Modifier and Type | Field | Description |
|---|---|---|
protected org.eclipse.jetty.util.ByteArrayOutputStream2 |
_bout |
|
protected java.lang.String |
_contentType |
|
protected java.io.File |
_file |
|
protected java.lang.String |
_filename |
|
protected org.eclipse.jetty.util.MultiMap<java.lang.String> |
_headers |
|
protected java.lang.String |
_name |
|
protected java.io.OutputStream |
_out |
|
protected long |
_size |
|
protected boolean |
_temporary |
| Constructor | Description |
|---|---|
MultiPart(java.lang.String name,
java.lang.String filename) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cleanUp() |
Only remove tmp files.
|
protected void |
close() |
|
protected void |
createFile() |
|
void |
delete() |
Remove the file, whether or not Part.write() was called on it (ie no longer temporary)
|
byte[] |
getBytes() |
|
java.lang.String |
getContentDispositionFilename() |
Get the filename from the content-disposition.
|
java.lang.String |
getContentType() |
|
java.io.File |
getFile() |
Get the file
|
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() |
|
java.lang.String |
getSubmittedFileName() |
|
protected void |
open() |
|
protected void |
setContentType(java.lang.String contentType) |
|
protected void |
setHeaders(org.eclipse.jetty.util.MultiMap<java.lang.String> headers) |
|
java.lang.String |
toString() |
|
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 org.eclipse.jetty.util.ByteArrayOutputStream2 _bout
protected java.lang.String _contentType
protected org.eclipse.jetty.util.MultiMap<java.lang.String> _headers
protected long _size
protected boolean _temporary
public java.lang.String toString()
toString in class java.lang.Objectprotected void setContentType(java.lang.String contentType)
protected void open()
throws java.io.IOException
java.io.IOExceptionprotected void close()
throws java.io.IOException
java.io.IOExceptionprotected void write(int b)
throws java.io.IOException
java.io.IOExceptionprotected void write(byte[] bytes,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionprotected void createFile()
throws java.io.IOException
java.io.IOExceptionprotected void setHeaders(org.eclipse.jetty.util.MultiMap<java.lang.String> headers)
public java.lang.String getContentType()
getContentType in interface Partpublic java.lang.String getHeader(java.lang.String name)
public java.util.Collection<java.lang.String> getHeaderNames()
getHeaderNames in interface Partpublic java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
getHeaders in interface Partpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface Partjava.io.IOExceptionpublic java.lang.String getSubmittedFileName()
getSubmittedFileName in interface Partpublic byte[] getBytes()
public void write(java.lang.String fileName)
throws java.io.IOException
public void delete()
throws java.io.IOException
public void cleanUp()
throws java.io.IOException
java.io.IOException - if unable to delete the filepublic java.io.File getFile()
public java.lang.String getContentDispositionFilename()
Copyright © 1995–2018 Webtide. All rights reserved.