public byte[] getSpecialSequence(int function) {

        byte[] sequence = null;

        switch (function) {
            case TerminalIO.STORECURSOR:
                sequence = new byte[2];
                sequence[0] = ESC;
                sequence[1] = 55; // Ascii Code of 7
                break;
            case TerminalIO.RESTORECURSOR:
                sequence = new byte[2];
                sequence[0] = ESC;
                sequence[1] = 56; // Ascii Code of 8
                break;
            case TerminalIO.DEVICERESET:
                sequence = new byte[2];
                sequence[0] = ESC;
                sequence[1] = 99; // Ascii Code of c
                break;
            case TerminalIO.LINEWRAP:
                sequence = new byte[4];
                sequence[0] = ESC;
                sequence[1] = LSB;
                sequence[2] = 55; // Ascii code of 7
                sequence[3] = 104; // Ascii code of h
                break;
            case TerminalIO.NOLINEWRAP:
                sequence = new byte[4];
                sequence[0] = ESC;
                sequence[1] = LSB;
                sequence[2] = 55; // Ascii code of 7
                sequence[3] = 108; // Ascii code of l
                break;
        }
        return sequence;
    }// getSpecialSequence