Package org.eclipse.jetty.util
Class MultiPartWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- org.eclipse.jetty.util.MultiPartWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class MultiPartWriter extends java.io.FilterWriterHandle a multipart MIME response.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMULTIPART_MIXEDstatic java.lang.StringMULTIPART_X_MIXED_REPLACE
-
Constructor Summary
Constructors Constructor Description MultiPartWriter(java.io.Writer out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()End the current part.voidendPart()end creation of the next Content.java.lang.StringgetBoundary()voidstartPart(java.lang.String contentType)Start creation of the next Content.voidstartPart(java.lang.String contentType, java.lang.String[] headers)Start creation of the next Content.
-
-
-
Field Detail
-
MULTIPART_MIXED
public static final java.lang.String MULTIPART_MIXED
- See Also:
- Constant Field Values
-
MULTIPART_X_MIXED_REPLACE
public static final java.lang.String MULTIPART_X_MIXED_REPLACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionEnd the current part.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FilterWriter- Throws:
java.io.IOException- IOException
-
getBoundary
public java.lang.String getBoundary()
-
startPart
public void startPart(java.lang.String contentType) throws java.io.IOExceptionStart creation of the next Content.- Parameters:
contentType- the content type- Throws:
java.io.IOException- if unable to write the part
-
endPart
public void endPart() throws java.io.IOExceptionend creation of the next Content.- Throws:
java.io.IOException- if unable to write the part
-
startPart
public void startPart(java.lang.String contentType, java.lang.String[] headers) throws java.io.IOExceptionStart creation of the next Content.- Parameters:
contentType- the content type of the partheaders- the part headers- Throws:
java.io.IOException- if unable to write the part
-
-