|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.io.fileio.htaccess.HypertextPasswordFile
public class HypertextPasswordFile
This is a simple class for checking/reading htpassword files.
Method Summary | |
---|---|
static char[] |
getPasswordData(java.io.File file,
java.lang.String username,
boolean strictMode)
Tries to load the password data for the given user. |
static char[] |
getPasswordData(java.io.InputStream in,
java.lang.String username,
boolean strictMode)
Tries to load the password data for the given user. |
static char[] |
getPasswordData(java.io.LineNumberReader lnr,
java.lang.String username,
boolean strictMode)
Tries to load the password data for the given user. |
static void |
main(java.lang.String[] argv)
For testing only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static char[] getPasswordData(java.io.File file, java.lang.String username, boolean strictMode) throws java.io.IOException, java.text.ParseException
file
- The input file (must be a text file in .htpasswd format).username
- The user's name.strictMode
- If this mode is set to true the reader will NOT ignore any unknown/unexpected
irregularities but throw a ParseException.
java.io.IOException
- If any IO errors occur.
java.text.ParseException
- If the passed file cannot be parsed or is not a htpasswd file.public static char[] getPasswordData(java.io.InputStream in, java.lang.String username, boolean strictMode) throws java.io.IOException, java.text.ParseException
file
- The input file (must be a text file in .htpasswd format).username
- The user's name.strictMode
- If this mode is set to true the reader will NOT ignore any unknown/unexpected
irregularities but throw a ParseException.
java.io.IOException
- If any IO errors occur.
java.text.ParseException
- If the passed file cannot be parsed or is not a htpasswd file.public static char[] getPasswordData(java.io.LineNumberReader lnr, java.lang.String username, boolean strictMode) throws java.io.IOException, java.text.ParseException
file
- The input file (must be a text file in .htpasswd format).username
- The user's name.strictMode
- If this mode is set to true the reader will NOT ignore any unknown/unexpected
irregularities but throw a ParseException.
java.io.IOException
- If any IO errors occur.
java.text.ParseException
- If the passed file cannot be parsed or is not a htpasswd file.public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |