Top Description Constructors Methods
org.springframework.oxm.support

public abstract Class SaxResourceUtils

extends Object
Class Inheritance
Imports
java.io.IOException, org.xml.sax.InputSource, org.springframework.core.io.Resource, org.springframework.lang.Nullable

Convenient utility methods for dealing with SAX.
Authors
Arjen Poutsma, Juergen Hoeller
Since
3.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static InputSource

Returns:

the input source created from the resource
createInputSource
(Resource
the resource
resource
)

Create a SAX InputSource from the given resource.

private static String
getSystemId(Resource resource)

Retrieve the URL from the given resource as System ID.

Returns null if it cannot be opened.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SaxResourceUtilsback to summary
public SaxResourceUtils()

Method Detail

createInputSourceback to summary
public static InputSource createInputSource(Resource resource) throws IOException

Create a SAX InputSource from the given resource.

Sets the system identifier to the resource's URL, if available.

Parameters
resource:Resource

the resource

Returns:InputSource

the input source created from the resource

Exceptions
IOException:
if an I/O exception occurs
See Also
InputSource#setSystemId(String), getSystemId(org.springframework.core.io.Resource)
getSystemIdback to summary
private static String getSystemId(Resource resource)

Retrieve the URL from the given resource as System ID.

Returns null if it cannot be opened.

Annotations
@Nullable