Beispiel #1
0
 private void writeHostAndPortToFile(File portFile) {
   String host = socket.getInetAddress().getHostName();
   int port = socket.getLocalPort();
   // The motivation for the Log.warn would be better satisfied by Bug 38.
   Log.warn("echo " + host + ":" + port + " > " + portFile);
   StringUtilities.writeFile(portFile, host + ":" + port + "\n");
 }
Beispiel #2
0
 private void writeNewSecret() {
   long secretValue = secureRandom.nextLong();
   secret = new Long(secretValue).toString();
   StringUtilities.writeFile(secretFile, secret);
 }