code: protected void writeResultDetailed(Map<BioPAXElement, List<Match>> matches, OutputStream out,
  		int columns) throws IOException
  	{
  		OutputStreamWriter writer = new OutputStreamWriter(out);
  
  		// write the header
  
  		String header = getHeader();
  		if (header != null)
  		{
  			writer.write(header);
  		}
  		else
  		{
  			for (int i = 0; i < columns; i++)
  			{
  				writer.write("col-" + (i+1));
  				if (i < columns - 1) writer.write("\t");
  			}
  		}
  
  		// memory for already written lines
  		Set<String> mem = new HashSet<String>();
  
  		// write values
  
  		for (BioPAXElement ele : matches.keySet())
  		{
  			for (Match m : matches.get(ele))
  			{
  				String line = "";
  				boolean aborted = false;
  
  				for (int i = 0; i < columns; i++)
  				{
  					String s = getValue(m, i);
  
  					if (s == null)
  					{
  						aborted = true;
  						break;
  					}
  					else
  					{
  						line += s + "\t";
  					}
  				}
  
  				if (aborted) continue;
  
  				line = line.trim();
  
  				if (!mem.contains(line))
  				{
  					writer.write("\n" + line);
  					mem.add(line);
  				}
  			}
  		}
  		writer.flush();
  	}
docs: Writes the result as a tab delimited format, where the column values are customized.
  @param matches result matches
  @param out output stream
  @param columns number of columns in the result
  @throws IOException if cannot write to the stream