Package org.hibernate.boot.archive.spi
Interface InputStreamAccess
- All Known Implementing Classes:
ByteArrayInputStreamAccess
,FileInputStreamAccess
,UrlInputStreamAccess
public interface InputStreamAccess
Contract for building InputStreams, especially in on-demand situations
-
Method Summary
Modifier and TypeMethodDescriptionGet access to the stream.default <X> X
fromStream
(Function<InputStream, X> action) Get the name of the resource backing the stream
-
Method Details
-
getStreamName
String getStreamName()Get the name of the resource backing the stream- Returns:
- The backing resource name
-
accessInputStream
InputStream accessInputStream()Get access to the stream. Can be called multiple times, a different stream instance should be returned each time.- Returns:
- The stream
-
fromStream
-