Class SimpleCsvHttpMessageConverter

java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
net.solarnetwork.web.support.SimpleCsvHttpMessageConverter
All Implemented Interfaces:
org.springframework.http.converter.HttpMessageConverter<Object>

public class SimpleCsvHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<Object>
HttpMessageConverter that marshals objects into CSV documents.
Version:
1.3
Author:
matt
  • Field Details

    • DEFAULT_JAVA_BEAN_IGNORE_PROPERTIES

      public static final String[] DEFAULT_JAVA_BEAN_IGNORE_PROPERTIES
      The default value for the javaBeanIgnoreProperties property.
    • DEFAULT_JAVA_BEAN_STRING_VALUES

      public static final Class<?>[] DEFAULT_JAVA_BEAN_STRING_VALUES
      The default value for the javaBeanTreatAsStringValues property.
  • Constructor Details

    • SimpleCsvHttpMessageConverter

      public SimpleCsvHttpMessageConverter()
      Default constructor.
  • Method Details

    • supports

      protected boolean supports(Class<?> clazz)
      Specified by:
      supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
    • readInternal

      protected Object readInternal(Class<? extends Object> clazz, org.springframework.http.HttpInputMessage inputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotReadableException
      Specified by:
      readInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
      Throws:
      IOException
      org.springframework.http.converter.HttpMessageNotReadableException
    • writeInternal

      protected void writeInternal(Object t, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
      Specified by:
      writeInternal in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
      Throws:
      IOException
      org.springframework.http.converter.HttpMessageNotWritableException
    • getPropertySerializerRegistrar

      public net.solarnetwork.codec.PropertySerializerRegistrar getPropertySerializerRegistrar()
      Get the property serializer registrar.
      Returns:
      the registrar
    • setPropertySerializerRegistrar

      public void setPropertySerializerRegistrar(net.solarnetwork.codec.PropertySerializerRegistrar propertySerializerRegistrar)
      Set the property serializer registrar.
      Parameters:
      propertySerializerRegistrar - the registrar to set
    • getJavaBeanIgnoreProperties

      public Set<String> getJavaBeanIgnoreProperties()
      Get the JavaBean properties to ignore.
      Returns:
      the properties
    • setJavaBeanIgnoreProperties

      public void setJavaBeanIgnoreProperties(Set<String> javaBeanIgnoreProperties)
      Set the JavaBean properties to ignore.
      Parameters:
      javaBeanIgnoreProperties - the properties
    • getJavaBeanTreatAsStringValues

      public Set<Class<?>> getJavaBeanTreatAsStringValues()
      Get the JavaBean classes to treat as strings.
      Returns:
      the class set
    • setJavaBeanTreatAsStringValues

      public void setJavaBeanTreatAsStringValues(Set<Class<?>> javaBeanTreatAsStringValues)
      Set the JavaBean classes to treat as strings.
      Parameters:
      javaBeanTreatAsStringValues - the class set
    • isIncludeHeader

      public boolean isIncludeHeader()
      Get the "include header" option.
      Returns:
      true to include a header row in the output; defaults to true
    • setIncludeHeader

      public void setIncludeHeader(boolean includeHeader)
      Set the "include header" option.
      Parameters:
      includeHeader - true to include a header row in the output