/** Read from the MPlayer standard output and error a line that starts with the given parameter and return it.
     * @param expected the expected starting string for the line
     * @return the entire line from the standard output or error of MPlayer
     */
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) {
// 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) {
// 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) {
// 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;
}