public class MultiPartFormInputStream.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 |
protected boolean |
_temporary |
| Constructor and Description |
|---|
MultiPart(java.lang.String name,
java.lang.String filename) |
| Modifier and Type | Method and 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(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 ByteArrayOutputStream2 _bout
protected java.lang.String _contentType
protected 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(MultiMap<java.lang.String> headers)
public java.lang.String getContentType()
getContentType in interface javax.servlet.http.Partpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.Partpublic java.util.Collection<java.lang.String> getHeaderNames()
getHeaderNames in interface javax.servlet.http.Partpublic java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
getHeaders in interface javax.servlet.http.Partpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface javax.servlet.http.Partjava.io.IOExceptionpublic java.lang.String getSubmittedFileName()
getSubmittedFileName in interface javax.servlet.http.Partpublic byte[] getBytes()
public java.lang.String getName()
getName in interface javax.servlet.http.Partpublic long getSize()
getSize in interface javax.servlet.http.Partpublic void write(java.lang.String fileName)
throws java.io.IOException
write in interface javax.servlet.http.Partjava.io.IOExceptionpublic void delete()
throws java.io.IOException
delete in interface javax.servlet.http.Partjava.io.IOExceptionpublic 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–2021 Webtide. All rights reserved.