Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active Nov 27, 2020
Embed
What would you like to do?
Class Mp3Converter {
public convertToMp3(source, String mimeType){
if(mimeType.equals("audio/mpeg")) {
this.convertMpegToMp3(source)
}else if(mimeType.equals("audio/wav")) {
this.convertWavToMp3(source)
}else if(mimeType.equals("audio/ogg")) {
this.convertOggToMp3(source)
}else if(...){
... //Lots of new elses
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment