RobotRuntimeException.java 887 B

1234567891011121314151617181920212223242526272829303132
  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 RobotRuntimeException implements IJsonObject, IRead{
  6. public int lineNumber;
  7. public int columnNumber;
  8. public String message;
  9. @Override
  10. public JsonObject toJSON() {
  11. return new JsonObject()
  12. .add("lineNumber", lineNumber)
  13. .add("columnNumber", columnNumber)
  14. .add("message", message)
  15. ;
  16. }
  17. @Override
  18. public void read(CountDataInputStream di, int size) throws IOException {
  19. RobotRuntimeException re = new RobotRuntimeException();
  20. re.lineNumber=di.readInt();
  21. re.columnNumber=di.readInt();
  22. byte[] bmsg=new byte[size-15-8];
  23. di.readFully(bmsg);
  24. re.message=bmsg.toString();
  25. }
  26. }