code: public static void writeSequences(OutputStream outputStream,
  			Collection<Sequence<?>> sequences) throws Exception {
  
  		GenbankHeaderFormatInterface<Sequence<?>, Compound> fhfi = new GenbankHeaderFormatInterface<Sequence<?>, Compound>() {
  
  			@Override
  			public String getHeader(Sequence<?> sequence) {
  				return sequence.getAccession().toString();
  			}
  
  			;
  		};
  
  		GenbankWriter<Sequence<?>, Compound> genbankWriter = new GenbankWriter<Sequence<?>, Compound>(
  				outputStream, sequences, fhfi);
  
  		genbankWriter.process();
  	}
docs: Method which will write your given Sequences to the specified
  {@link OutputStream}. This is a very generic method which writes just the
  AccessionID of the Sequence as the FASTA header.
  
  @param outputStream
  Stream to write to; can be System.out
  @param sequences
  The sequences to write out
  @throws Exception
  Thrown normally thanks to IO problems