public class JreCompat
extends java.lang.Object
| Constructor and Description |
|---|
JreCompat() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.sql.Connection connection,
java.util.concurrent.Executor executor) |
void |
addBootModulePath(java.util.Deque<java.net.URL> classPathUrlsToProcess)
Obtains the URls for all the JARs on the module path when the JVM starts
and adds them to the provided Deque.
|
void |
closeOnCompletion(java.sql.Statement statement) |
void |
disableCachingForJarUrlConnections()
Disables caching for JAR URL connections.
|
java.util.Locale |
forLanguageTag(java.lang.String languageTag) |
boolean |
generatedKeyAlwaysReturned(java.sql.DatabaseMetaData databaseMetaData) |
java.util.zip.GZIPOutputStream |
getFlushableGZipOutputStream(java.io.OutputStream os) |
static JreCompat |
getInstance() |
int |
getNetworkTimeout(java.sql.Connection connection) |
<T> T |
getObject(java.sql.CallableStatement callableStatement,
int parameterIndex,
java.lang.Class<T> type) |
<T> T |
getObject(java.sql.CallableStatement callableStatement,
java.lang.String parameterName,
java.lang.Class<T> type) |
<T> T |
getObject(java.sql.ResultSet resultSet,
int parameterIndex,
java.lang.Class<T> type) |
<T> T |
getObject(java.sql.ResultSet resultSet,
java.lang.String parameterName,
java.lang.Class<T> type) |
java.sql.ResultSet |
getPseudoColumns(java.sql.DatabaseMetaData databaseMetaData,
java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern,
java.lang.String columnNamePattern) |
java.lang.String |
getSchema(java.sql.Connection connection) |
boolean |
isCloseOnCompletion(java.sql.Statement statement) |
boolean |
isCommonsAnnotations1_1Available() |
boolean |
isInstanceOfInaccessibleObjectException(java.lang.Throwable t)
Test if the provided exception is an instance of
java.lang.reflect.InaccessibleObjectException.
|
static boolean |
isJre7Available() |
static boolean |
isJre8Available() |
static boolean |
isJre9Available() |
boolean |
jarFileIsMultiRelease(java.util.jar.JarFile jarFile)
Is this JarFile a multi-release JAR file.
|
java.util.jar.JarFile |
jarFileNewInstance(java.io.File f)
Creates a new JarFile instance.
|
int |
jarFileRuntimeMajorVersion() |
void |
setNetworkTimeout(java.sql.Connection connection,
java.util.concurrent.Executor executor,
int milliseconds) |
void |
setSchema(java.sql.Connection connection,
java.lang.String schema) |
void |
setUseServerCipherSuitesOrder(javax.net.ssl.SSLEngine engine,
boolean useCipherSuitesOrder) |
void |
setUseServerCipherSuitesOrder(javax.net.ssl.SSLServerSocket socket,
boolean useCipherSuitesOrder) |
public static JreCompat getInstance()
public static boolean isJre7Available()
public java.util.Locale forLanguageTag(java.lang.String languageTag)
public java.util.zip.GZIPOutputStream getFlushableGZipOutputStream(java.io.OutputStream os)
public <T> T getObject(java.sql.CallableStatement callableStatement,
int parameterIndex,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T getObject(java.sql.CallableStatement callableStatement,
java.lang.String parameterName,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setSchema(java.sql.Connection connection,
java.lang.String schema)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getSchema(java.sql.Connection connection)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void abort(java.sql.Connection connection,
java.util.concurrent.Executor executor)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setNetworkTimeout(java.sql.Connection connection,
java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getNetworkTimeout(java.sql.Connection connection)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.ResultSet getPseudoColumns(java.sql.DatabaseMetaData databaseMetaData,
java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern,
java.lang.String columnNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean generatedKeyAlwaysReturned(java.sql.DatabaseMetaData databaseMetaData)
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T getObject(java.sql.ResultSet resultSet,
int parameterIndex,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic <T> T getObject(java.sql.ResultSet resultSet,
java.lang.String parameterName,
java.lang.Class<T> type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void closeOnCompletion(java.sql.Statement statement)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isCloseOnCompletion(java.sql.Statement statement)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean isJre8Available()
public void setUseServerCipherSuitesOrder(javax.net.ssl.SSLServerSocket socket,
boolean useCipherSuitesOrder)
public void setUseServerCipherSuitesOrder(javax.net.ssl.SSLEngine engine,
boolean useCipherSuitesOrder)
public static boolean isJre9Available()
public boolean isInstanceOfInaccessibleObjectException(java.lang.Throwable t)
t - The exception to testtrue if the exception is an instance of
InaccessibleObjectException, otherwise falsepublic void disableCachingForJarUrlConnections()
throws java.io.IOException
java.io.IOException - If a dummy JAR URLConnection can not be createdpublic void addBootModulePath(java.util.Deque<java.net.URL> classPathUrlsToProcess)
classPathUrlsToProcess - The Deque to which the modules should be
addedpublic java.util.jar.JarFile jarFileNewInstance(java.io.File f)
throws java.io.IOException
f - The JAR file to openjava.io.IOException - If an I/O error occurs creating the JarFile instancepublic boolean jarFileIsMultiRelease(java.util.jar.JarFile jarFile)
jarFile - The JarFile to testtrue If it is a multi-release JAR file and is configured
to behave as such.public int jarFileRuntimeMajorVersion()
public boolean isCommonsAnnotations1_1Available()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.