RobotProgramLabel.java 641 B

12345678910111213141516171819202122232425262728
  1. package at.acdp.urweb.sclient.data;
  2. import at.acdp.urweb.CountDataInputStream;
  3. import com.eclipsesource.json.JsonObject;
  4. import java.io.IOException;
  5. public class RobotProgramLabel implements IRead, IJsonObject{
  6. public int row;
  7. public String message;
  8. @Override
  9. public JsonObject toJSON() {
  10. return new JsonObject()
  11. .add("row", row)
  12. .add("message", message);
  13. }
  14. @Override
  15. public void read(CountDataInputStream di, int size) throws IOException {
  16. row=di.readInt();
  17. byte[] asd=new byte[size-15-4];
  18. di.readFully(asd);
  19. message=new String(asd);
  20. }
  21. }