org.springframework.http.converter.HttpMessageConverter
that can read and write Source objects.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final EntityResolver | |
| private static final XMLResolver | |
| private boolean | |
| private boolean | |
| private static final Set | |
| private final TransformerFactory |
| Access | Constructor and Description |
|---|---|
| public | SourceHttpMessageConverter()
Sets the |
| Modifier and Type | Method and Description |
|---|---|
| protected Long | getContentLength(T
the type to return the content length for t, MediaType contentType)Overrides org. Returns the content length for the given type. |
| public boolean | |
| public boolean | |
| private DOMSource | |
| protected T | readInternal(Class<? extends T>
the type of object to return clazz, HttpInputMessage the HTTP input message to read from inputMessage)Implements abstract org. Abstract template method that reads the actual object. |
| private SAXSource | |
| private Source | |
| private StreamSource | |
| public void | setProcessExternalEntities(boolean processExternalEntities)
Indicate whether external XML entities are processed when converting to a Source. |
| public void | |
| public boolean | supports(Class<?>
the class to test for support clazz)Implements abstract org. Indicates whether the given class is supported by this converter. |
| protected boolean | supportsRepeatableWrites(T
the object t t)Overrides org. Indicates whether this message converter can write the given object multiple times. |
| private void | |
| protected void | writeInternal(T
the object to write to the output message t, HttpOutputMessage the HTTP output message to write to outputMessage)Implements abstract org. Abstract template method that writes the actual body. |
| NO_OP_ENTITY_RESOLVER | back to summary |
|---|---|
| private static final EntityResolver NO_OP_ENTITY_RESOLVER | |
| NO_OP_XML_RESOLVER | back to summary |
|---|---|
| private static final XMLResolver NO_OP_XML_RESOLVER | |
| processExternalEntities | back to summary |
|---|---|
| private boolean processExternalEntities | |
| supportDtd | back to summary |
|---|---|
| private boolean supportDtd | |
| SUPPORTED_CLASSES | back to summary |
|---|---|
| private static final Set<Class<?>> SUPPORTED_CLASSES | |
| transformerFactory | back to summary |
|---|---|
| private final TransformerFactory transformerFactory | |
| SourceHttpMessageConverter | back to summary |
|---|---|
| public SourceHttpMessageConverter() Sets the | |
| getContentLength | back to summary |
|---|---|
| protected Long getContentLength(T t, MediaType contentType) Overrides org. Doc from org. Returns the content length for the given type. By default, this returns | |
| isProcessExternalEntities | back to summary |
|---|---|
| public boolean isProcessExternalEntities() Return whether XML external entities are allowed. | |
| isSupportDtd | back to summary |
|---|---|
| public boolean isSupportDtd() Return whether DTD parsing is supported. | |
| readDOMSource | back to summary |
|---|---|
| private DOMSource readDOMSource(InputStream body, HttpInputMessage inputMessage) throws IOException | |
| readInternal | back to summary |
|---|---|
| protected T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException Implements abstract org. Doc from org. Abstract template method that reads the actual object. Invoked from
| |
| readSAXSource | back to summary |
|---|---|
| private SAXSource readSAXSource(InputStream body, HttpInputMessage inputMessage) throws IOException | |
| readStAXSource | back to summary |
|---|---|
| private Source readStAXSource(InputStream body, HttpInputMessage inputMessage) | |
| readStreamSource | back to summary |
|---|---|
| private StreamSource readStreamSource(InputStream body) throws IOException | |
| setProcessExternalEntities | back to summary |
|---|---|
| public void setProcessExternalEntities(boolean processExternalEntities) Indicate whether external XML entities are processed when converting to a Source. Default is Note setting this option to | |
| setSupportDtd | back to summary |
|---|---|
| public void setSupportDtd(boolean supportDtd) Indicate whether DTD parsing should be supported. Default is | |
| supports | back to summary |
|---|---|
| public boolean supports(Class<?> clazz) Implements abstract org. Doc from org. Indicates whether the given class is supported by this converter. | |
| supportsRepeatableWrites | back to summary |
|---|---|
| protected boolean supportsRepeatableWrites(T t) Overrides org. Doc from org. Indicates whether this message converter can write the given object multiple times. Default implementation returns
| |
| transform | back to summary |
|---|---|
| private void transform(Source source, Result result) throws TransformerException | |
| writeInternal | back to summary |
|---|---|
| protected void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException Implements abstract org. Doc from org. Abstract template method that writes the actual body. Invoked from
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public void | write(byte[]
the data. b)Overrides java. Writes |
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| count | back to summary |
|---|---|
| pack-priv long count | |
| CountingOutputStream | back to summary |
|---|---|
| private CountingOutputStream() | |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |