org.w3c.jwput
Class ETagManager

java.lang.Object
  |
  +--org.w3c.jwput.ETagManager
All Implemented Interfaces:
ETagsDatabase, JWOptions

public class ETagManager
extends java.lang.Object
implements ETagsDatabase, JWOptions

Very simple ETagsDatabase, based on XML properties


Field Summary
protected static org.w3c.util.XMLProperties etags
           
protected static java.io.File etagsfile
           
 
Fields inherited from interface org.w3c.jwput.JWOptions
ACCEPT_LANGUAGE_P, BACKUP_P, DEF_TRIES, ETAGS_DB, FALSE_P, HEADER_PREFIX, HIDE_POPUPS_P, HOMEDIR_P, LOAD_DIR_P, MIME_PREFIX, MIMEDEF_P, OVERWRITE_P, PASSWORD_P, PROGRESS_BAR_P, PROMPT_P, PROXY_HOST_P, PROXY_PORT_P, PROXY_SET_P, PUT_CVS_P, QUIET_P, REC_P, SAVE_DIR_P, SOCKS_HOST_P, SOCKS_PORT_P, TRIES_P, TRUE_P, USER_AGENT_P, USER_P, VERBOSE_P, WPUTDIR, WPUTRC
 
Constructor Summary
ETagManager()
           
 
Method Summary
 java.lang.String getETag(java.io.File file, java.lang.String url)
          Get the ETag relative to the given file which was puted at the given url.
protected  java.util.Properties loadETags(java.io.File file)
           
 void removeETag(java.io.File file, java.lang.String url)
          Remove the ETag from the database
 void saveETag(java.io.File file, java.lang.String url, java.lang.String etag)
          Save the ETag into the database
protected  void saveETags(java.io.File file, java.util.Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

etags

protected static org.w3c.util.XMLProperties etags

etagsfile

protected static java.io.File etagsfile
Constructor Detail

ETagManager

public ETagManager()
Method Detail

loadETags

protected java.util.Properties loadETags(java.io.File file)

saveETags

protected void saveETags(java.io.File file,
                         java.util.Properties props)

getETag

public java.lang.String getETag(java.io.File file,
                                java.lang.String url)
Get the ETag relative to the given file which was puted at the given url.
Specified by:
getETag in interface ETagsDatabase
Parameters:
file - the local file
url - its url
Returns:
a String instance

removeETag

public void removeETag(java.io.File file,
                       java.lang.String url)
Remove the ETag from the database
Specified by:
removeETag in interface ETagsDatabase
Parameters:
file - the local file
url - its url

saveETag

public void saveETag(java.io.File file,
                     java.lang.String url,
                     java.lang.String etag)
Save the ETag into the database
Specified by:
saveETag in interface ETagsDatabase
Parameters:
file - the local file
url - its url
etag - the ETag