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

com.indeed.mph.serializers.AbstractParseable Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.indeed.mph.serializers;

import com.indeed.mph.Parseable;

import java.io.IOException;
import java.io.OutputStream;

/**
 * @author alexs
 */
public abstract class AbstractParseable implements Parseable {
    private static final long serialVersionUID = 1370948847;

    public T parseFromString(final String s) throws IOException {
        throw new UnsupportedOperationException();
    }

    public void print(final T t, final OutputStream out) throws IOException {
        out.write(printToString(t).getBytes("UTF-8"));
    }

    public String printToString(final T t) {
        return String.valueOf(t);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy