@Override public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { try { return readFromSource(clazz, inputMessage.getHeaders(), new StreamSource(inputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotReadableException("Could not unmarshal to [" + clazz + "]: " + ex.getMessage(), ex, inputMessage); } }
@Override protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { try { writeToResult(t, outputMessage.getHeaders(), new StreamResult(outputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotWritableException("Could not marshal [" + t + "]: " + ex.getMessage(), ex); } }
@Override public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { try { return readFromSource(clazz, inputMessage.getHeaders(), new StreamSource(inputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotReadableException("Could not unmarshal to [" + clazz + "]: " + ex.getMessage(), ex, inputMessage); } }
@Override protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { try { writeToResult(t, outputMessage.getHeaders(), new StreamResult(outputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotWritableException("Could not marshal [" + t + "]: " + ex.getMessage(), ex); } }
@Override public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { return readFromSource(clazz, inputMessage.getHeaders(), new StreamSource(inputMessage.getBody())); }
@Override protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException { writeToResult(t, outputMessage.getHeaders(), new StreamResult(outputMessage.getBody())); }
@Override public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException { return readFromSource(clazz, inputMessage.getHeaders(), new StreamSource(inputMessage.getBody())); }
@Override protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { writeToResult(t, outputMessage.getHeaders(), new StreamResult(outputMessage.getBody())); }
@Override public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { try { return readFromSource(clazz, inputMessage.getHeaders(), new StreamSource(inputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotReadableException("Could not unmarshal to [" + clazz + "]: " + ex.getMessage(), ex, inputMessage); } }
@Override protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { try { writeToResult(t, outputMessage.getHeaders(), new StreamResult(outputMessage.getBody())); } catch (IOException | HttpMessageConversionException ex) { throw ex; } catch (Exception ex) { throw new HttpMessageNotWritableException("Could not marshal [" + t + "]: " + ex.getMessage(), ex); } }