Class PgPassParser
java.lang.Object
org.postgresql.jdbcurlresolver.PgPassParser
helps to read Password File.
https://www.postgresql.org/docs/current/libpq-pgpass.html
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePgPassParser(String hostname, String port, String database, String user) -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringcheckForPattern(String line, String value) private StringevaluateLine(String fullLine, int currentLine) private static StringextractPassword(String line) private Stringprivate static Stringstatic StringgetPassword(String hostname, String port, String database, String user) Read .pgpass resourceprivate static InputStreamopenInputStream(String resourceName) private StringparseInputStream(InputStream inputStream)
-
Field Details
-
LOGGER
-
SEPARATOR
private static final char SEPARATOR- See Also:
-
hostname
-
port
-
database
-
user
-
-
Constructor Details
-
PgPassParser
-
-
Method Details
-
getPassword
-
findPassword
-
openInputStream
- Throws:
IOException
-
findPgPasswordResourceName
-
parseInputStream
- Throws:
IOException
-
evaluateLine
-
extractPassword
-
checkForPattern
-