package at.acdp.urweb.rtde.packets; import at.acdp.urweb.rtde.RTDEClient; import org.slf4j.LoggerFactory; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; public interface IRtdeData { final static org.slf4j.Logger logger = LoggerFactory.getLogger(RTDEClient.class); int getType(); T read(DataInputStream di, int length) throws IOException; T send(DataOutputStream dos) throws IOException; default void sendHeader(DataOutputStream dos, int length) throws IOException { dos.writeShort(length+3); dos.writeByte(getType()); } }