private static void loadProxyProperties() throws ProxyConfigurationNotFound { if ( proxyProperties == null ) proxyProperties = PropertyLoader.load (PROXY_PROPERTIES_FILE); if (proxyProperties == null) { throw new ProxyConfigurationNotFound( "Unable to load the file: " + PROXY_PROPERTIES_FILE ); } }
/** * Print a user friendly time for estimated time of completion of the task. * * @param currentCount current count of unit processed. * @return a nicely formatted remaining time. */ public String printETA( long currentCount ) { long eta = calculateETA( currentCount ); return new ElapsedTime( ( int ) eta ).toString(); } }
/** * Non-recursive listing of the files in a URL * @param folderUrl The folder to read * @return the lists of URLs * @throws IOException */ public static List<URL> listFilesFromFolderUrl(URL folderUrl) throws IOException { return listFilesFromFolderUrl(folderUrl, null, false); }
private static String generateCitexploreUrl( String pubmedId ) { return SearchReplace.replace( CITEXPLORE_URL, PUBMED_ID_FLAG, pubmedId ); }
/** * D E M O * * @param args * @throws MessagingException */ public static void main( String[] args ) throws MessagingException { MailSender mailer = new MailSender(); String[] recipients = {"skerrien@ebi.ac.uk"}; mailer.postMail( recipients, "test from java", "content", "skerrien@ebi.ac.uk" ); } }
public void enableCaching () { cache = new NewtLRUCache(); }
/** * Setup the HTTP proxy. * Displays the logging on STDOUT. * * @throws ProxyConfigurationNotFound if the proxy.properties file is not found */ public static void setup( ) throws ProxyConfigurationNotFound { setup(System.out); }
/** * Uncompresses zipped files * @param zippedFile The file to uncompress */ public static List<File> unzip(File zippedFile) throws IOException { return unzip(zippedFile, null); }
public MemoryMonitor() { hook(); }
public void run(){buildMemoryReport(); } }
public static AnnotationFilter getInstance() { if ( ourInstance == null ) { ourInstance = new AnnotationFilter(); } return ourInstance; }
private static void loadProxyProperties() throws ProxyConfigurationNotFound { if ( proxyProperties == null ) proxyProperties = PropertyLoader.load (PROXY_PROPERTIES_FILE); if (proxyProperties == null) { throw new ProxyConfigurationNotFound( "Unable to load the file: " + PROXY_PROPERTIES_FILE ); } }
public void enableCaching (int maxElement) { cache = new NewtLRUCache(maxElement); }
/** * Non-recursive listing of the files in a URL * @param folderUrl The folder to read * @return the lists of URLs * @throws IOException */ public static List<URL> listFilesFromFolderUrl(URL folderUrl) throws IOException { return listFilesFromFolderUrl(folderUrl, null, false); }
/** * Setup the HTTP proxy. * Displays the logging on STDOUT. * * @throws ProxyConfigurationNotFound if the proxy.properties file is not found */ public static void setup( ) throws ProxyConfigurationNotFound { setup(System.out); }
/** * Uncompresses zipped files * @param zippedFile The file to uncompress */ public static List<File> unzip(File zippedFile) throws IOException { return unzip(zippedFile, null); }
public MemoryMonitor() { hook(); }
public void run(){buildMemoryReport(); } }
public void enableCaching () { cache = new NewtLRUCache(); }
public void enableCaching (int maxElement) { cache = new NewtLRUCache(maxElement); }