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

com.opdar.gulosity.serializable.YearSerializable Maven / Gradle / Ivy

package com.opdar.gulosity.serializable;

import java.nio.ByteBuffer;

/**
 * Created by 俊帆 on 2016/10/12.
 */
public class YearSerializable extends JavaSerializable {
    public YearSerializable(int type) {
        super(type);
    }

    public String getValue(int meta, ByteBuffer buffer) {
        final int year = buffer.get();
        if (year == 0) {
            return  "0000";
        } else {
            return String.valueOf((short) (year + 1900));
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy