class FileUtil {

    public static String sessionIdFileName(SessionID sessionID) {
        return replaceIllegalCharactersInFileName(sessionID.getBeginString() + "-"
                + sessionID.getSenderCompID() + optionalField("_", sessionID.getSenderSubID())
                + optionalField("_", sessionID.getSenderLocationID()) + "-"
                + sessionID.getTargetCompID() + optionalField("_", sessionID.getTargetSubID())
                + optionalField("_", sessionID.getTargetLocationID())
                + optionalField("-", sessionID.getSessionQualifier()));
    }

}