Top Description Fields Constructors Methods
org.hibernate.validator.internal.xml.config

pack-priv final Class ResourceLoaderHelper

extends Object
Class Inheritance
Imports
java.io.BufferedInputStream, .InputStream, java.lang.invoke.MethodHandles, java.security.AccessController, .PrivilegedAction, org.hibernate.validator.internal.IgnoreForbiddenApisErrors, org.hibernate.validator.internal.util.logging.Log, .LoggerFactory, org.hibernate.validator.internal.util.privilegedactions.GetClassLoader

Helper methods for loading resource files
Author
Hardy Ferentschik

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static InputStream

Returns:

An input stream for the given path or null if no such resource exists.
getResettableInputStreamForPath
(String
The path of the requested input stream.
path
,
ClassLoader externalClassLoader)

Returns an input stream for the given path, which supports the mark/reset contract.

private static <T> T
run(PrivilegedAction<T> action)

Runs the given privileged action, using a privileged block if required.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Log LOG

Constructor Detail

ResourceLoaderHelperback to summary
private ResourceLoaderHelper()

Method Detail

getResettableInputStreamForPathback to summary
pack-priv static InputStream getResettableInputStreamForPath(String path, ClassLoader externalClassLoader)

Returns an input stream for the given path, which supports the mark/reset contract.

Parameters
path:String

The path of the requested input stream.

Returns:InputStream

An input stream for the given path or null if no such resource exists.

See Also
InputStream#markSupported()
runback to summary
private static <T> T run(PrivilegedAction<T> action)

Runs the given privileged action, using a privileged block if required.

Note

This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.

Annotations
@IgnoreForbiddenApisErrors
reason:SecurityManager is deprecated in JDK17