package app;
import java.io.IOException;
import java.io.InputStream;
import java.io.FileOutputStream;
import java.util.Enumeration;
import java.util.Properties;
import java.net.URL;
public class UserDirectory {
/**
/
private static final String UserDirectoryFile =
"resources/users.properties";
/**
/
private static final String UserDirectoryHeader =
"${user}=${password}";
/**
/
private static UserDirectory userDirectory = null;
/**
/
private static Properties p;
/**
/
private UserDirectory() throws UserDirectoryException {
java.io.InputStream i = null;
p = null;
i = this.getClass().getClassLoader().
getResourceAsStream(UserDirectoryFile);
if (null==i) {
throw new UserDirectoryException();
}
else {
try {
p = new Properties();
p.load(i);
i.close();
}
catch (java.io.IOException e) {
p = null;
System.out.println(e.getMessage());