| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private byte[] | |
| private static final HashSet | |
| private static final HashSet | |
| private String | name
The database name |
| private String | |
| private NetworkConnectionInfo | |
| private String | |
| private boolean | |
| private Properties | |
| private boolean | |
| private boolean | |
| private TimeZoneProvider | |
| private boolean | |
| private String | |
| private String | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| public | ConnectionInfo(String
the database name (including tags), but without the
"jdbc:h2:" prefix name)Create a connection info object. |
| public | ConnectionInfo(String
the database URL (must start with jdbc:h2:) u, Properties the connection properties or info, String nullthe user name or user, Object nullthe password as password)String or char[], or
nullCreate a connection info object. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ConnectionInfo | |
| private void | convertPasswords()
Split the password property into file password and user password if necessary, and convert them to the internal hash format. |
| public DbSettings | |
| pack-priv byte[] | |
| public byte[] | |
| pack-priv DbException | |
| pack-priv int | Returns: the value as an integerthe setting id setting, int the default value defaultValue)Get the value of the given property. |
| pack-priv String[] | |
| public String | Returns: the database nameGet the unique and normalized database name (excluding settings). |
| public NetworkConnectionInfo | Returns: the network connection information, ornullReturns the network connection information, or |
| public String | |
| public boolean | Returns: the valuethe property name key, boolean the default value defaultValue)Get a boolean property if it is set and return the value. |
| pack-priv String | Returns: the value as a Stringthe property key key)Get the value of the given property. |
| pack-priv int | Returns: the value as a Stringthe property key key, int the default value defaultValue)Get the value of the given property. |
| public String | Returns: the value as a Stringthe property key key, String the default value defaultValue)Get the value of the given property. |
| pack-priv String | Returns: the value as a Stringthe setting id setting, String the default value defaultValue)Get the value of the given property. |
| public TimeZoneProvider | |
| public String | |
| public String | |
| pack-priv byte[] | |
| private static byte[] | |
| public static boolean | Returns: whether setting with the specified name should be ignored by parserthe name of the setting name)Returns whether setting with the specified name should be ignored by parser. |
| private static boolean | |
| public boolean | |
| public boolean | |
| pack-priv boolean | |
| pack-priv boolean | Returns: true if it isCheck if the referenced database is an unnamed in-memory database. |
| private void | |
| private void | |
| private void | |
| private void | |
| private static String | |
| private char[] | |
| public boolean | Returns: the valuethe property name key, boolean the default value defaultValue)Remove a boolean property if it is set and return the value. |
| pack-priv String | Returns: the valuethe property name key, String the default value defaultValue)Remove a String property if it is set and return the value. |
| public void | setBaseDir(String
the new base directory dir)Set the base directory of persistent databases, unless the database is in the user home folder (~). |
| public void | |
| public void | |
| public void | setNetworkConnectionInfo(NetworkConnectionInfo
the network connection information networkConnectionInfo)Sets the network connection information. |
| public void | |
| public void | |
| public void | setServerKey(String
the server name, '/', and the security key serverKey)Switch to server mode, and set the server name and database key. |
| public void | |
| public void |
| fileEncryptionKey | back to summary |
|---|---|
| private byte[] fileEncryptionKey | |
| filePasswordHash | back to summary |
|---|---|
| private byte[] filePasswordHash | |
| IGNORED_BY_PARSER | back to summary |
|---|---|
| private static final HashSet<String> IGNORED_BY_PARSER | |
| KNOWN_SETTINGS | back to summary |
|---|---|
| private static final HashSet<String> KNOWN_SETTINGS | |
| name | back to summary |
|---|---|
| private String name The database name | |
| nameNormalized | back to summary |
|---|---|
| private String nameNormalized | |
| networkConnectionInfo | back to summary |
|---|---|
| private NetworkConnectionInfo networkConnectionInfo | |
| originalURL | back to summary |
|---|---|
| private String originalURL | |
| persistent | back to summary |
|---|---|
| private boolean persistent | |
| prop | back to summary |
|---|---|
| private Properties prop | |
| remote | back to summary |
|---|---|
| private boolean remote | |
| ssl | back to summary |
|---|---|
| private boolean ssl | |
| timeZone | back to summary |
|---|---|
| private TimeZoneProvider timeZone | |
| unnamed | back to summary |
|---|---|
| private boolean unnamed | |
| url | back to summary |
|---|---|
| private String url | |
| user | back to summary |
|---|---|
| private String user | |
| userPasswordHash | back to summary |
|---|---|
| private byte[] userPasswordHash | |
| ConnectionInfo | back to summary |
|---|---|
| public ConnectionInfo(String name) Create a connection info object.
| |
| ConnectionInfo | back to summary |
|---|---|
| public ConnectionInfo(String u, Properties info, String user, Object password) Create a connection info object.
| |
| cleanAuthenticationInfo | back to summary |
|---|---|
| public void cleanAuthenticationInfo() Clear authentication properties. | |
| clone | back to summary |
|---|---|
| public ConnectionInfo clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| convertPasswords | back to summary |
|---|---|
| private void convertPasswords() Split the password property into file password and user password if necessary, and convert them to the internal hash format. | |
| getDbSettings | back to summary |
|---|---|
| public DbSettings getDbSettings() | |
| getFileEncryptionKey | back to summary |
|---|---|
| pack-priv byte[] getFileEncryptionKey() | |
| getFilePasswordHash | back to summary |
|---|---|
| public byte[] getFilePasswordHash() Get the file password hash if it is set.
| |
| getFormatException | back to summary |
|---|---|
| pack-priv DbException getFormatException() Generate a URL format exception.
| |
| getIntProperty | back to summary |
|---|---|
| pack-priv int getIntProperty(int setting, int defaultValue) Get the value of the given property.
| |
| getKeys | back to summary |
|---|---|
| pack-priv String[] getKeys() Get the property keys.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the unique and normalized database name (excluding settings).
| |
| getNetworkConnectionInfo | back to summary |
|---|---|
| public NetworkConnectionInfo getNetworkConnectionInfo() Returns the network connection information, or
| |
| getOriginalURL | back to summary |
|---|---|
| public String getOriginalURL() Get the complete original database URL.
| |
| getProperty | back to summary |
|---|---|
| public boolean getProperty(String key, boolean defaultValue) Get a boolean property if it is set and return the value.
| |
| getProperty | back to summary |
|---|---|
| pack-priv String getProperty(String key) Get the value of the given property. | |
| getProperty | back to summary |
|---|---|
| pack-priv int getProperty(String key, int defaultValue) Get the value of the given property.
| |
| getProperty | back to summary |
|---|---|
| public String getProperty(String key, String defaultValue) Get the value of the given property. | |
| getProperty | back to summary |
|---|---|
| pack-priv String getProperty(int setting, String defaultValue) Get the value of the given property. | |
| getTimeZone | back to summary |
|---|---|
| public TimeZoneProvider getTimeZone() Returns the time zone.
| |
| getURL | back to summary |
|---|---|
| public String getURL() Get the database URL.
| |
| getUserName | back to summary |
|---|---|
| public String getUserName() Get the name of the user.
| |
| getUserPasswordHash | back to summary |
|---|---|
| pack-priv byte[] getUserPasswordHash() Get the user password hash.
| |
| hashPassword | back to summary |
|---|---|
| private static byte[] hashPassword(boolean passwordHash, String userName, char[] password) | |
| isIgnoredByParser | back to summary |
|---|---|
| public static boolean isIgnoredByParser(String name) Returns whether setting with the specified name should be ignored by parser.
| |
| isKnownSetting | back to summary |
|---|---|
| private static boolean isKnownSetting(String s) | |
| isPersistent | back to summary |
|---|---|
| public boolean isPersistent() Check if the referenced database is persistent.
| |
| isRemote | back to summary |
|---|---|
| public boolean isRemote() Check if this is a remote connection.
| |
| isSSL | back to summary |
|---|---|
| pack-priv boolean isSSL() Check if this is a remote connection with SSL enabled.
| |
| isUnnamedInMemory | back to summary |
|---|---|
| pack-priv boolean isUnnamedInMemory() Check if the referenced database is an unnamed in-memory database.
| |
| parseName | back to summary |
|---|---|
| private void parseName() | |
| preservePasswordForAuthentication | back to summary |
|---|---|
| private void preservePasswordForAuthentication(Object password) | |
| readProperties | back to summary |
|---|---|
| private void readProperties(Properties info) | |
| readSettingsFromURL | back to summary |
|---|---|
| private void readSettingsFromURL() | |
| remapURL | back to summary |
|---|---|
| private static String remapURL(String url) | |
| removePassword | back to summary |
|---|---|
| private char[] removePassword() | |
| removeProperty | back to summary |
|---|---|
| public boolean removeProperty(String key, boolean defaultValue) Remove a boolean property if it is set and return the value.
| |
| removeProperty | back to summary |
|---|---|
| pack-priv String removeProperty(String key, String defaultValue) Remove a String property if it is set and return the value. | |
| setBaseDir | back to summary |
|---|---|
| public void setBaseDir(String dir) Set the base directory of persistent databases, unless the database is in the user home folder (~).
| |
| setFileEncryptionKey | back to summary |
|---|---|
| public void setFileEncryptionKey(byte[] key) | |
| setFilePasswordHash | back to summary |
|---|---|
| public void setFilePasswordHash(byte[] hash) Set the file password hash.
| |
| setNetworkConnectionInfo | back to summary |
|---|---|
| public void setNetworkConnectionInfo(NetworkConnectionInfo networkConnectionInfo) Sets the network connection information.
| |
| setOriginalURL | back to summary |
|---|---|
| public void setOriginalURL(String url) Set the original database URL.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String key, String value) Overwrite a property. | |
| setServerKey | back to summary |
|---|---|
| public void setServerKey(String serverKey) Switch to server mode, and set the server name and database key.
| |
| setUserName | back to summary |
|---|---|
| public void setUserName(String name) Overwrite the user name. The user name is case-insensitive and stored in uppercase. English conversion is used.
| |
| setUserPasswordHash | back to summary |
|---|---|
| public void setUserPasswordHash(byte[] hash) Set the user password hash.
| |