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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description InputStream
accessInputStream()
Get access to the stream.default <X> X
fromStream(Function<InputStream,X> action)
String
getStreamName()
Get the name of the resource backing the stream
-
-
-
Method Detail
-
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
default <X> X fromStream(Function<InputStream,X> action)
-
-