package com.jotuntech.sketcher.common; import java.io.IOException; import java.nio.ByteBuffer; /** Utility methods for the DataIO interface. * @author Thor Harald Johansen * */ public class StreamableUtils { public static Streamable create(String className, ByteBuffer in) throws IOException, IllegalAccessException, ClassNotFoundException, InstantiationException { Streamable streamable = (Streamable)Class.forName(className).newInstance(); streamable.decode(in); return streamable; } }