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

com.viaoa.util.xmladapter.OATimeXmlAdapter Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
package com.viaoa.util.xmladapter;

import java.time.Clock;
import java.time.ZoneId;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import com.viaoa.util.OATime;

public class OATimeXmlAdapter extends XmlAdapter {

    
    @Override
    public String marshal(OATime dt) throws Exception {
        if (dt == null) return null;

        String s = dt.toString("HH:mm:ss");        
        return s;
    }

    @Override
    public OATime unmarshal(String cal) throws Exception {
        if (cal == null) return null;
        
        OATime dt = new OATime(cal, "HH:mm:ssZ");
        
        return dt;
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy