XmlProviders Class

  • java.lang.Object
    • com.azure.xml.XmlProviders

public final class XmlProviders

Handles loading an instance of XmlProvider found on the classpath.

Method Summary

Modifier and Type Method and Description
static XmlReader createReader(byte[] xml)

Creates an instance of XmlReader that reads a byte[].

static XmlReader createReader(byte[] xml, boolean useDefault)

Creates an instance of XmlReader that reads a byte[].

static XmlReader createReader(InputStream xml)

Creates an instance of XmlReader that reads a InputStream.

static XmlReader createReader(InputStream xml, boolean useDefault)

Creates an instance of XmlReader that reads a InputStream.

static XmlReader createReader(Reader xml)

Creates an instance of XmlReader that reads a Reader.

static XmlReader createReader(Reader xml, boolean useDefault)

Creates an instance of XmlReader that reads a Reader.

static XmlReader createReader(String xml)

Creates an instance of XmlReader that reads a String.

static XmlReader createReader(String xml, boolean useDefault)

Creates an instance of XmlReader that reads a String.

static XmlWriter createWriter(OutputStream xml)

Creates an instance of XmlWriter that writes to an OutputStream.

static XmlWriter createWriter(OutputStream xml, boolean useDefault)

Creates an instance of XmlWriter that writes to an OutputStream.

static XmlWriter createWriter(Writer xml)

Creates an instance of XmlWriter that writes to an Writer.

static XmlWriter createWriter(Writer xml, boolean useDefault)

Creates an instance of XmlWriter that writes to an Writer.

Methods inherited from java.lang.Object

Method Details

createReader

public static XmlReader createReader(byte[] xml)

Creates an instance of XmlReader that reads a byte[].

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createReader(byte[] xml, boolean useDefault).

Parameters:

xml - The XML represented as a byte[].

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(byte[] xml, boolean useDefault)

Creates an instance of XmlReader that reads a byte[].

Parameters:

xml - The XML represented as a byte[].
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(InputStream xml)

Creates an instance of XmlReader that reads a InputStream.

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createReader(InputStream xml, boolean useDefault).

Parameters:

xml - The XML represented as a InputStream.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(InputStream xml, boolean useDefault)

Creates an instance of XmlReader that reads a InputStream.

Parameters:

xml - The XML represented as a InputStream.
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(Reader xml)

Creates an instance of XmlReader that reads a Reader.

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createReader(Reader xml, boolean useDefault).

Parameters:

xml - The XML represented as a Reader.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(Reader xml, boolean useDefault)

Creates an instance of XmlReader that reads a Reader.

Parameters:

xml - The XML represented as a Reader.
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(String xml)

Creates an instance of XmlReader that reads a String.

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createReader(String xml, boolean useDefault).

Parameters:

xml - The XML represented as a String.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createReader

public static XmlReader createReader(String xml, boolean useDefault)

Creates an instance of XmlReader that reads a String.

Parameters:

xml - The XML represented as a String.
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If xml is null.

createWriter

public static XmlWriter createWriter(OutputStream xml)

Creates an instance of XmlWriter that writes to an OutputStream.

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createWriter(OutputStream xml, boolean useDefault).

Parameters:

xml - The XML represented as an OutputStream.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If xml is null.

createWriter

public static XmlWriter createWriter(OutputStream xml, boolean useDefault)

Creates an instance of XmlWriter that writes to an OutputStream.

Parameters:

xml - The XML represented as an OutputStream.
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If xml is null.

createWriter

public static XmlWriter createWriter(Writer xml)

Creates an instance of XmlWriter that writes to an Writer.

If a provider could not be found on the classpath this will use the default implementation, effectively the equivalent to createWriter(Writer xml, boolean useDefault).

Parameters:

xml - The XML represented as an Writer.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If xml is null.

createWriter

public static XmlWriter createWriter(Writer xml, boolean useDefault)

Creates an instance of XmlWriter that writes to an Writer.

Parameters:

xml - The XML represented as an Writer.
useDefault - Whether the default implementation should be used if one could not be found on the classpath.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If xml is null.

Applies to