All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.robe.convert.excel.parsers.ParseByte Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.convert.excel.parsers;

import org.apache.poi.ss.usermodel.Cell;

import java.lang.reflect.Field;

public class ParseByte implements IsParser {
    @Override
    public Object parse(Object o, Field field) {
        Byte b = null;
        if (o instanceof String) {
            b = Byte.valueOf(o.toString());
        }

        return b;
    }

    @Override
    public void setCell(Object o, Cell cell, Field field) {
        Byte aByte = (Byte) o;
        if (aByte != null) {
            cell.setCellValue(aByte);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy