public class RegexRulesPasswordProvider extends Object implements org.apache.tika.parser.PasswordProvider
| Constructor and Description | 
|---|
| RegexRulesPasswordProvider() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getExplicitPassword()Gets the explicit password, if set | 
| String | getPassword(org.apache.tika.metadata.Metadata meta) | 
| LinkedHashMap<Pattern,String> | getPasswordMap() | 
| void | parse(InputStream is)Initialize rules through file input stream. | 
| static LinkedHashMap<Pattern,String> | parseRulesFile(InputStream is)Parses rule file from stream and returns a Map of all rules found | 
| void | resetExplicitPassword()Resets explicit password, so that map will be used for lookups | 
| void | setExplicitPassword(String explicitPassword)Sets an explicit password which will be used instead of password map | 
| void | setPasswordMap(LinkedHashMap<Pattern,String> linkedHashMap) | 
public String getPassword(org.apache.tika.metadata.Metadata meta)
getPassword in interface org.apache.tika.parser.PasswordProviderpublic static LinkedHashMap<Pattern,String> parseRulesFile(InputStream is)
is - input stream for the filepublic void parse(InputStream is)
is - the input stream with rules file, one line per rule on format regex=passwordpublic LinkedHashMap<Pattern,String> getPasswordMap()
public void setPasswordMap(LinkedHashMap<Pattern,String> linkedHashMap)
public String getExplicitPassword()
public void setExplicitPassword(String explicitPassword)
explicitPassword - the password to usepublic void resetExplicitPassword()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.