| Constructor and Description |
|---|
MockPart(String name,
byte[] content)
Constructor for a part with byte[] content only.
|
MockPart(String name,
String filename,
InputStream content)
Constructor for a part with a filename.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
String |
getContentType() |
String |
getHeader(String name) |
Collection<String> |
getHeaderNames() |
org.springframework.http.HttpHeaders |
getHeaders()
Return the
HttpHeaders backing header related accessor methods. |
Collection<String> |
getHeaders(String name) |
InputStream |
getInputStream() |
String |
getName() |
long |
getSize() |
String |
getSubmittedFileName() |
void |
write(String fileName) |
public MockPart(String name, byte[] content)
public MockPart(String name, String filename, InputStream content) throws IOException
IOExceptionpublic String getSubmittedFileName()
getSubmittedFileName in interface Partpublic String getContentType()
getContentType in interface Partpublic InputStream getInputStream() throws IOException
getInputStream in interface PartIOExceptionpublic Collection<String> getHeaders(String name)
getHeaders in interface Partpublic Collection<String> getHeaderNames()
getHeaderNames in interface Partpublic org.springframework.http.HttpHeaders getHeaders()
HttpHeaders backing header related accessor methods.public void write(String fileName) throws IOException
write in interface PartIOExceptionpublic void delete()
throws IOException
delete in interface PartIOException