code: private static void parse(final Reader r) throws IOException {
  		final BufferedReader br = new BufferedReader(r);
  		String line;
  		final ArrayList<String> sequence = new ArrayList<String>();
  
  		line = br.readLine();
  		while (true) {
  			if (line == null) {
  				break;
  			}
  			line = line.trim();
  			if (line.length() == 0 || line.charAt(0) == '#') {
  				line = br.readLine();
  				continue;
  			}
  			sequence.add(line);
  
  			// read the following lines until a line does not begin with '>' or
  			// EOF
  			while (true) {
  				line = br.readLine();
  				if (line == null) {
  					addEntry(sequence);
  					sequence.clear();
  					break;
  				}
  				line = line.trim();
  				if (line.length() == 0 || line.charAt(0) == '#') {
  					continue;
  				}
  				if (line.charAt(0) != '>') {
  					addEntry(sequence);
  					sequence.clear();
  					break;
  				}
  				sequence.add(line);
  			}
  		}
  		if (!sequence.isEmpty()) {
  			addEntry(sequence);
  		}
  	}
docs: Parse the magic.mime file