File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
hibernate-core/src/main/java/org/hibernate/boot/jaxb Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 15
15
16
16
import org .hibernate .boot .MappingException ;
17
17
import org .hibernate .boot .ResourceStreamLocator ;
18
+ import org .hibernate .boot .archive .internal .RepeatableInputStreamAccess ;
18
19
import org .hibernate .boot .archive .spi .InputStreamAccess ;
19
20
import org .hibernate .boot .jaxb .Origin ;
20
21
import org .hibernate .boot .jaxb .internal .stax .BufferedXMLEventReader ;
@@ -43,6 +44,11 @@ protected AbstractBinder(ResourceStreamLocator resourceStreamLocator) {
43
44
this .xmlResourceResolver = new LocalXmlResourceResolver ( resourceStreamLocator );
44
45
}
45
46
47
+ @ Override
48
+ public <X extends T > Binding <X > bind (InputStream stream , Origin origin ) {
49
+ return bind ( new RepeatableInputStreamAccess (origin .getName (), stream ), origin );
50
+ }
51
+
46
52
@ Override
47
53
public <X extends T > Binding <X > bind (InputStreamAccess streamAccess , Origin origin ) {
48
54
this .streamAccess = streamAccess ;
Original file line number Diff line number Diff line change 9
9
import org .hibernate .boot .archive .spi .InputStreamAccess ;
10
10
import org .hibernate .boot .jaxb .Origin ;
11
11
12
+ import java .io .InputStream ;
13
+
12
14
/**
13
15
* Contract for performing JAXB binding.
14
16
*
@@ -24,6 +26,17 @@ public interface Binder<T> {
24
26
*/
25
27
<X extends T > Binding <X > bind (Source source , Origin origin );
26
28
29
+ /**
30
+ * Bind from an InputStream
31
+ *
32
+ * @param stream The InputStream containing XML
33
+ * @param origin The descriptor of the stream origin
34
+ * @return The bound JAXB model
35
+ * @deprecated Use {@link #bind(InputStreamAccess, Origin)} instead
36
+ */
37
+ @ Deprecated (since = "7.2" )
38
+ <X extends T > Binding <X > bind (InputStream stream , Origin origin );
39
+
27
40
/**
28
41
* Bind from an InputStreamAccess
29
42
*
You can’t perform that action at this time.
0 commit comments