forked from fanruan/easyexcel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
723 B
26 lines
723 B
package com.alibaba.excel.converters.bytearray; |
|
|
|
import com.alibaba.excel.converters.Converter; |
|
import com.alibaba.excel.metadata.GlobalConfiguration; |
|
import com.alibaba.excel.metadata.data.WriteCellData; |
|
import com.alibaba.excel.metadata.property.ExcelContentProperty; |
|
|
|
/** |
|
* Byte array and image converter |
|
* |
|
* @author Jiaju Zhuang |
|
*/ |
|
public class ByteArrayImageConverter implements Converter<byte[]> { |
|
|
|
@Override |
|
public Class<byte[]> supportJavaTypeKey() { |
|
return byte[].class; |
|
} |
|
|
|
@Override |
|
public WriteCellData<?> convertToExcelData(byte[] value, ExcelContentProperty contentProperty, |
|
GlobalConfiguration globalConfiguration) { |
|
return new WriteCellData<>(value); |
|
} |
|
|
|
}
|
|
|