code: public static boolean write(Set<SIFInteraction> inters, OutputStream out)
  	{
  		SIFToText stt = new CustomFormat(
  			OutputColumn.Type.RESOURCE.name(),
  			OutputColumn.Type.PUBMED.name(),
  			OutputColumn.Type.PATHWAY.name(),
  			OutputColumn.Type.MEDIATOR.name());
  
  		if (!inters.isEmpty())
  		{
  			List<SIFInteraction> interList = new ArrayList<SIFInteraction>(inters);
  			Collections.sort(interList);
  			try {
  				OutputStreamWriter writer = new OutputStreamWriter(out);
  				writer.write("PARTICIPANT_A\tINTERACTION_TYPE\tPARTICIPANT_B\t" +
  								"INTERACTION_DATA_SOURCE\tINTERACTION_PUBMED_ID\tPATHWAY_NAMES\tMEDIATOR_IDS");
  				for (SIFInteraction inter : interList) {
  					writer.write("\n" + stt.convert(inter));
  				}
  				writer.write("\n\n");//last line's EOL, + one blank line
  				writeSourceAndTargetDetails(inters, writer);
  				writer.close();
  				return true;
  			}
  			catch (IOException e) {
  				e.printStackTrace();
  			}
  		}
  
  		return false;
  	}
docs: Writes down the given inferred binary interactions into the output stream
  using the Pathway Commons one-file EXTENDED_BINARY_SIF format,
  where edges (interactions) are written first, followed by a single
  blank line, followed by the nodes section (participant details and annotations).
  Closes the output stream at the end.
  @param inters binary interactions
  @param out stream to write
  @return true if any output produced successfully