code: public static List<FastaSequence> readFasta(final InputStream inStream)
  		throws IOException {
  	final List<FastaSequence> seqs = new ArrayList<FastaSequence>();
  
  	final BufferedReader infasta = new BufferedReader(
  		new InputStreamReader(inStream, "UTF8"), 16000);
  	final Pattern pattern = Pattern.compile("//s+");
  
  	String line;
  	String sname = "", seqstr = null;
  	do {
  		line = infasta.readLine();
  		if ((line == null) || line.startsWith(">")) {
  		if (seqstr != null) {
  			seqs.add(new FastaSequence(sname.substring(1), seqstr));
  		}
  		sname = line; // remove >
  		seqstr = "";
  		} else {
  		final String subseq = pattern.matcher(line).replaceAll("");
  		seqstr += subseq;
  		}
  	} while (line != null);
  
  	infasta.close();
  	return seqs;
  	}
docs: Reads fasta sequences from inStream into the list of FastaSequence
  objects
  
  @param inStream
  from
  @return list of FastaSequence objects
  @throws IOException