package net.northking.cctp.upperComputer.driver.agent.command;

import net.northking.cctp.upperComputer.driver.agent.command.protocol.AbstractProtocolCommand;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class TakeScreenshotCommand extends AbstractProtocolCommand<byte[]> {

    private static TakeScreenshotCommand instance = null;

    public static TakeScreenshotCommand getInstance() {
        if (instance == null) {
            instance = new TakeScreenshotCommand();
        }
        return instance;
    }

    @Override
    public int getCommandId() {
        return 33;
    }

    @Override
    public void doSend(DataOutput output) throws IOException {

    }

    @Override
    public byte[] buildReceive(DataInput input) throws IOException {
        int size = input.readInt();
        byte[] buffer = new byte[size];
        input.readFully(buffer);
        return buffer;
    }
}
