/** * Stores a URLConnection in association with a key. * * @param key The key that is associated to the URLConnection. * @param conn The URLConnection that should be stored in association with the key. */ public void put( Object key, URLConnection conn ) { synchronized( this ) // ensure no ConcurrentModificationException can occur. { Entry entry = new Entry( conn ); m_hardStore.put( key, entry ); if( m_thread == null ) { m_thread = new Thread( this, "ConnectionCache-cleaner" ); m_thread.setDaemon( true ); m_thread.start(); } } }