if (verbose) { System.out.print("tool " + toolname + " writes term:\n"); System.out.print(new String(ls)); System.out.println(term); } outputStream.write(ls); term.writeToTextFile(outputStream); if (LENSPEC+size < MIN_MSG_SIZE) { info("padding with " + (MIN_MSG_SIZE-(LENSPEC+size)) + " zero bytes."); } for (int i=LENSPEC+size; i<MIN_MSG_SIZE; i++) { outputStream.write(0); } outputStream.flush();
  public synchronized void sendTerm(ATerm term)    throws IOException    {      String unparsedTerm = term.toString();      int size = unparsedTerm.length();      String lenspec = "00000000" + (size+LENSPEC) + ":";      int len = lenspec.length();      byte[] ls = new byte[LENSPEC];      for (int i=0; i<LENSPEC; i++) {	ls[i] = (byte)lenspec.charAt(len+i-LENSPEC);      }      if (verbose) {	System.out.print("tool " + toolname + " writes term:\n");	System.out.print(new String(ls));	System.out.println(term);      }      outputStream.write(ls);      term.writeToTextFile(outputStream);      if (LENSPEC+size < MIN_MSG_SIZE) {	info("padding with " + (MIN_MSG_SIZE-(LENSPEC+size)) + " zero bytes.");      }      for (int i=LENSPEC+size; i<MIN_MSG_SIZE; i++) {	outputStream.write(0);      }      outputStream.flush();    }