Class BytesConverter

java.lang.Object
io.leandev.appfuse.converter.BytesConverter
All Implemented Interfaces:
Converter<byte[]>

public class BytesConverter extends Object implements Converter<byte[]>

byte[] 類型轉換器

支援從 Base64 編碼字串(包括 data URI)轉換為 byte 陣列。

  • Constructor Details

    • BytesConverter

      public BytesConverter()
      建立預設轉換器
  • Method Details

    • convert

      public byte[] convert(Object value) throws ConversionException
      Description copied from interface: Converter
      Converts the given value to the target type.
      Specified by:
      convert in interface Converter<byte[]>
      Parameters:
      value - the value to convert
      Returns:
      the converted value of type T
      Throws:
      ConversionException - if the value cannot be converted