private String waitForAnswer(String expected) {
        // todo add the possibility to specify more options to be specified
        // todo use regexp matching instead of the beginning of a string
        String line = null;
        if (expected != null) {
            try {
                while ((line = mplayerOutErr.readLine()) != null) {
                    if (MusicZones.getIsDebugOn()) {
                        logger.log(Level.INFO, "Reading line: {0}", line);
                    }
                    if (line.startsWith(expected)) {
                        return line;
                    }
                }
            } catch (IOException ex) {
                System.err.println(ex);
            }
        }
        return line;
    }
private String waitForAnswer(String expected) {
       
       
        String line = null;
        if (expected != null) {
            try {
                while ((line = mplayerOutErr.readLine()) != null) {
                    if (MusicZones.getIsDebugOn()) {
                        logger.log(Level.INFO, "Reading line: {0}", line);
                    }
                    if (line.startsWith(expected)) {
                        return line;
                    }
                }
            } catch (IOException ex) {
                System.err.println(ex);
            }
        }
        return line;
    }
private string waitforanswer(string expected) { string line = null; if (expected != null) { try { while ((line = mplayerouterr.readline()) != null) { if (musiczones.getisdebugon()) { logger.log(level.info, "reading line: {0}", line); } if (line.startswith(expected)) { return line; } } } catch (ioexception ex) { system.err.println(ex); } } return line; }