public abstract class AbstractMultipartForm extends Object
Description:
| 构造器和说明 |
|---|
AbstractMultipartForm(Charset charset,
String boundary)
Creates an instance with the specified settings.
|
AbstractMultipartForm(String boundary) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract void |
formatMultipartHeader(FormBodyPart part,
OutputStream out)
Write the multipart header fields; depends on the style.
|
abstract List<FormBodyPart> |
getBodyParts() |
long |
getTotalLength()
Determines the total length of the multipart content (content length of
individual parts plus that of extra elements required to delimit the parts
from one another).
|
protected static void |
writeField(MinimalField field,
Charset charset,
OutputStream out) |
protected static void |
writeField(MinimalField field,
OutputStream out) |
void |
writeTo(OutputStream out)
Writes out the content in the multipart/form encoding.
|
public AbstractMultipartForm(Charset charset, String boundary)
charset - the character set to use. May be null, in which case Mime.DEFAULT_CHARSET - i.e. US-ASCII - is used.boundary - to use - must not be nullIllegalArgumentException - if charset is null or boundary is nullpublic AbstractMultipartForm(String boundary)
protected static void writeField(MinimalField field, OutputStream out) throws IOException
IOExceptionprotected static void writeField(MinimalField field, Charset charset, OutputStream out) throws IOException
IOExceptionpublic abstract List<FormBodyPart> getBodyParts()
protected abstract void formatMultipartHeader(FormBodyPart part, OutputStream out) throws IOException
IOExceptionpublic void writeTo(OutputStream out) throws IOException
IOExceptionpublic long getTotalLength()
This method buffers only a small amount of data in order to determine the total length of the entire entity. The content of individual parts is not buffered.
-1
otherwise.Copyright © 2019. All rights reserved.