You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
519 B
17 lines
519 B
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;
|
|
}
|
|
|
|
}
|
|
|