final class ExtensionFormHttpMessageConverter
extends org.springframework.http.converter.FormHttpMessageConverter
AllEncompassingFormHttpMessageConverter| 限定符和类型 | 类和说明 |
|---|---|
private static class |
ExtensionFormHttpMessageConverter.MultipartHttpOutputMessage
The type Multipart http output message.
|
| 限定符和类型 | 字段和说明 |
|---|---|
private static String |
BOUNDARY
The constant BOUNDARY.
|
private static boolean |
GSON_PRESENT
The constant gsonPresent.
|
private static boolean |
JACKSON_2_PRESENT
The constant jackson2Present.
|
private static boolean |
JACKSON_2_SMILE_PRESENT
The constant jackson2SmilePresent.
|
private static boolean |
JACKSON_2_XML_PRESENT
The constant jackson2XmlPresent.
|
private static boolean |
JAXB_2_PRESENT
The constant jaxb2Present.
|
private static boolean |
JSONB_PRESENT
The constant jsonbPresent.
|
private List<org.springframework.http.converter.HttpMessageConverter<?>> |
partConverters
The Part converters.
|
| 构造器和说明 |
|---|
ExtensionFormHttpMessageConverter()
Instantiates a new Upload http message converter.
|
| 限定符和类型 | 方法和说明 |
|---|---|
private void |
applyDefaultCharset()
Apply the configured charset as a default to registered part converters.
|
private org.springframework.http.MediaType |
getMediaType(org.springframework.http.MediaType mediaType)
Gets media type.
|
private boolean |
isMultipart(org.springframework.util.MultiValueMap<String,?> map,
org.springframework.http.MediaType contentType)
Is multipart boolean.
|
void |
write(org.springframework.util.MultiValueMap<String,?> map,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage) |
private void |
writeBoundary(OutputStream os,
byte[] boundary)
Write boundary.
|
private static void |
writeEnd(OutputStream os,
byte[] boundary)
Write end.
|
private void |
writeForm(org.springframework.util.MultiValueMap<String,Object> formData,
org.springframework.http.MediaType contentType,
org.springframework.http.HttpOutputMessage outputMessage)
Write form.
|
private void |
writeMultipart(org.springframework.util.MultiValueMap<String,Object> parts,
org.springframework.http.HttpOutputMessage outputMessage)
Write multipart.
|
private static void |
writeNewLine(OutputStream os)
Write new line.
|
private void |
writePart(String name,
org.springframework.http.HttpEntity<?> partEntity,
OutputStream os)
Write part.
|
private void |
writeParts(OutputStream os,
org.springframework.util.MultiValueMap<String,Object> parts,
byte[] boundary)
Write parts.
|
addPartConverter, addSupportedMediaTypes, canRead, canWrite, generateMultipartBoundary, getFilename, getFormContentType, getHttpEntity, getPartConverters, getSupportedMediaTypes, read, serializeForm, setCharset, setMultipartCharset, setPartConverters, setSupportedMediaTypesprivate static final boolean JAXB_2_PRESENT
private static final boolean JACKSON_2_PRESENT
private static final boolean JACKSON_2_XML_PRESENT
private static final boolean JACKSON_2_SMILE_PRESENT
private static final boolean GSON_PRESENT
private static final boolean JSONB_PRESENT
private final List<org.springframework.http.converter.HttpMessageConverter<?>> partConverters
public ExtensionFormHttpMessageConverter()
private void applyDefaultCharset()
public void write(org.springframework.util.MultiValueMap<String,?> map, @Nullable org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
write 在接口中 org.springframework.http.converter.HttpMessageConverter<org.springframework.util.MultiValueMap<String,?>>write 在类中 org.springframework.http.converter.FormHttpMessageConverterIOExceptionorg.springframework.http.converter.HttpMessageNotWritableExceptionprivate boolean isMultipart(org.springframework.util.MultiValueMap<String,?> map, @Nullable org.springframework.http.MediaType contentType)
map - the mapcontentType - the content typeprivate void writeForm(org.springframework.util.MultiValueMap<String,Object> formData, @Nullable org.springframework.http.MediaType contentType, org.springframework.http.HttpOutputMessage outputMessage) throws IOException
formData - the form datacontentType - the content typeoutputMessage - the output messageIOException - the io exceptionprivate org.springframework.http.MediaType getMediaType(@Nullable
org.springframework.http.MediaType mediaType)
mediaType - the media typeprivate void writeMultipart(org.springframework.util.MultiValueMap<String,Object> parts, org.springframework.http.HttpOutputMessage outputMessage) throws IOException
parts - the partsoutputMessage - the output messageIOException - the io exceptionprivate void writeParts(OutputStream os, org.springframework.util.MultiValueMap<String,Object> parts, byte[] boundary) throws IOException
os - the osparts - the partsboundary - the boundaryIOException - the io exceptionprivate void writePart(String name, org.springframework.http.HttpEntity<?> partEntity, OutputStream os) throws IOException
name - the namepartEntity - the part entityos - the osIOException - the io exceptionprivate void writeBoundary(OutputStream os, byte[] boundary) throws IOException
os - the osboundary - the boundaryIOException - the io exceptionprivate static void writeEnd(OutputStream os, byte[] boundary) throws IOException
os - the osboundary - the boundaryIOException - the io exceptionprivate static void writeNewLine(OutputStream os) throws IOException
os - the osIOException - the io exceptionCopyright © 2021. All rights reserved.