public int translateEscapeSequence(int[] buffer) {
        try {
            if (buffer[0] == LSB) {
                switch (buffer[1]) {
                    case A:
                        return TerminalIO.UP;
                    case B:
                        return TerminalIO.DOWN;
                    case C:
                        return TerminalIO.RIGHT;
                    case D:
                        return TerminalIO.LEFT;
                    default:
                        break;
                }
            }
        } catch (ArrayIndexOutOfBoundsException e) {
            return TerminalIO.BYTEMISSING;
        }

        return TerminalIO.UNRECOGNIZED;
    }// translateEscapeSequence