com.xiaoleilu.hutool.convert.impl.ByteArrayConverter Maven / Gradle / Ivy
package com.xiaoleilu.hutool.convert.impl;
import com.xiaoleilu.hutool.convert.AbstractConverter;
import com.xiaoleilu.hutool.convert.ConverterRegistry;
import com.xiaoleilu.hutool.util.ArrayUtil;
/**
* byte 类型数组转换器
* @author Looly
*
*/
public class ByteArrayConverter extends AbstractConverter{
@Override
protected byte[] convertInternal(Object value) {
final Byte[] result = ConverterRegistry.getInstance().convert(Byte[].class, value);
return ArrayUtil.unWrap(result);
}
}