package com.jotuntech.sketcher.server.command; import java.nio.ByteBuffer; import com.jotuntech.sketcher.server.Command; import com.jotuntech.sketcher.server.Connection; import com.jotuntech.sketcher.server.Server; public class CanvasCommand implements Command { protected int width, height; public CanvasCommand() { } public CanvasCommand(int width, int height) { this.width = width; this.height = height; } public int perform(Server server, Connection connection) { /** Do nothing on server. */ return Connection.SEND_NONE; } public void decode(ByteBuffer in) { width = in.getInt(); height = in.getInt(); } public void encode(ByteBuffer out) { out.putInt(width); out.putInt(height); } }