public class MultiPartWriter
extends java.io.FilterWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MULTIPART_MIXED |
static java.lang.String |
MULTIPART_X_MIXED_REPLACE |
Constructor and Description |
---|
MultiPartWriter(java.io.Writer out) |
Modifier and Type | Method and Description |
---|---|
void |
close()
End the current part.
|
void |
endPart()
end creation of the next Content.
|
java.lang.String |
getBoundary() |
void |
startPart(java.lang.String contentType)
Start creation of the next Content.
|
void |
startPart(java.lang.String contentType,
java.lang.String[] headers)
Start creation of the next Content.
|
public static final java.lang.String MULTIPART_MIXED
public static final java.lang.String MULTIPART_X_MIXED_REPLACE
public MultiPartWriter(java.io.Writer out) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterWriter
java.io.IOException
- IOExceptionpublic java.lang.String getBoundary()
public void startPart(java.lang.String contentType) throws java.io.IOException
contentType
- the content typejava.io.IOException
- if unable to write the partpublic void endPart() throws java.io.IOException
java.io.IOException
- if unable to write the partpublic void startPart(java.lang.String contentType, java.lang.String[] headers) throws java.io.IOException
contentType
- the content type of the partheaders
- the part headersjava.io.IOException
- if unable to write the partCopyright © 1995–2023 Webtide. All rights reserved.