public class MultiPartWriter extends FilterWriter
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
MULTIPART_MIXED |
static String |
MULTIPART_X_MIXED_REPLACE |
out| 构造器和说明 |
|---|
MultiPartWriter(Writer out) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
End the current part.
|
void |
endPart()
end creation of the next Content.
|
String |
getBoundary() |
void |
startPart(String contentType)
Start creation of the next Content.
|
void |
startPart(String contentType,
String[] headers)
Start creation of the next Content.
|
flush, write, write, writepublic MultiPartWriter(Writer out) throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 FilterWriterIOException - IOExceptionpublic String getBoundary()
public void startPart(String contentType) throws IOException
contentType - the content typeIOException - if unable to write the partpublic void endPart()
throws IOException
IOException - if unable to write the partpublic void startPart(String contentType, String[] headers) throws IOException
contentType - the content type of the partheaders - the part headersIOException - if unable to write the partCopyright © 2016. All rights reserved.