my bad. Here it is.
private void checkFile(String userid)
throws RecoverableConnectionException {
// Connecting to the peer
// Check if the sec file exist and it hasn't been changed by the external program.
if (!new File(SEC_FILE).exists()) {
if (cat.isDebugEnabled()) {
cat.debug("Security File exists: "
+ new File(SEC_FILE).exists()
+ " - logging in");
}
cat.debug("Starting login process for: " + userid);
logon();
cat.debug("Logon complete for: " + userid);
} else {
if (cat.isDebugEnabled()) {
cat.debug("Security File exists: "
+ new File(SEC_FILE).exists()
+ " - connecting to server");
}
Something like this maybe. But it really depends a lot on everything else. Its difficult to just convert small code sections like this because the languages are quite different.