Module bus.http

Class Convertor.FormConvertor

java.lang.Object
org.miaixz.bus.http.plugin.httpv.Convertor.FormConvertor
All Implemented Interfaces:
Convertor
Enclosing interface:
Convertor

public static class Convertor.FormConvertor extends Object implements Convertor
A form converter that can be used to automatically serialize form parameters.
  • Constructor Details

    • FormConvertor

      public FormConvertor(Convertor convertor)
  • Method Details

    • contentType

      public String contentType()
      Description copied from interface: Convertor
      Returns the media type of the messages handled by this converter.
      Specified by:
      contentType in interface Convertor
      Returns:
      The media type string.
    • toMapper

      public CoverWapper toMapper(InputStream in, Charset charset)
      Description copied from interface: Convertor
      Parses an input stream into a CoverWapper.
      Specified by:
      toMapper in interface Convertor
      Parameters:
      in - The input stream.
      charset - The character set.
      Returns:
      A CoverWapper instance.
    • toArray

      public CoverArray toArray(InputStream in, Charset charset)
      Description copied from interface: Convertor
      Parses an input stream into a CoverArray.
      Specified by:
      toArray in interface Convertor
      Parameters:
      in - The input stream.
      charset - The character set.
      Returns:
      A CoverArray instance.
    • serialize

      public byte[] serialize(Object object, Charset charset)
      Description copied from interface: Convertor
      Serializes a Java object into a byte array.
      Specified by:
      serialize in interface Convertor
      Parameters:
      object - The Java object.
      charset - The character set.
      Returns:
      A byte array.
    • serialize

      public byte[] serialize(Object object, String dateFormat, Charset charset)
      Description copied from interface: Convertor
      Serializes a Java object into a byte array with a specified date format.
      Specified by:
      serialize in interface Convertor
      Parameters:
      object - The Java object.
      dateFormat - The date format string.
      charset - The character set.
      Returns:
      A byte array.
    • toBean

      public <T> T toBean(Class<T> type, InputStream in, Charset charset)
      Description copied from interface: Convertor
      Parses an input stream into a Java bean of the specified type.
      Specified by:
      toBean in interface Convertor
      Type Parameters:
      T - The target generic type.
      Parameters:
      type - The target class type.
      in - The input stream.
      charset - The character set.
      Returns:
      A Java bean instance.
    • toList

      public <T> List<T> toList(Class<T> type, InputStream in, Charset charset)
      Description copied from interface: Convertor
      Parses an input stream into a list of Java objects of the specified type.
      Specified by:
      toList in interface Convertor
      Type Parameters:
      T - The target generic type.
      Parameters:
      type - The target class type.
      in - The input stream.
      charset - The character set.
      Returns:
      A list of Java objects.