XmlProvider Interface

public interface XmlProvider

An interface to be implemented by any azure-xml plugin that wishes to provide an alternate XmlReader or XmlWriter implementation.

Method Summary

Modifier and Type Method and Description
abstract XmlReader createReader(byte[] json)

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

abstract XmlReader createReader(InputStream json)

Creates an instance of XmlReader that reads a InputStream.

abstract XmlReader createReader(Reader json)

Creates an instance of XmlReader that reads a Reader.

abstract XmlReader createReader(String json)

Creates an instance of XmlReader that reads a String.

abstract XmlWriter createWriter(OutputStream json)

Creates an instance of XmlWriter that writes to an OutputStream.

abstract XmlWriter createWriter(Writer json)

Creates an instance of XmlWriter that writes to an Writer.

Method Details

createReader

public abstract XmlReader createReader(byte[] json)

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

Parameters:

json - The JSON represented as a byte[].

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If json is null.

createReader

public abstract XmlReader createReader(InputStream json)

Creates an instance of XmlReader that reads a InputStream.

Parameters:

json - The JSON represented as a InputStream.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If json is null.

createReader

public abstract XmlReader createReader(Reader json)

Creates an instance of XmlReader that reads a Reader.

Parameters:

json - The JSON represented as a Reader.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If json is null.

createReader

public abstract XmlReader createReader(String json)

Creates an instance of XmlReader that reads a String.

Parameters:

json - The JSON represented as a String.

Returns:

A new instance of XmlReader.

Throws:

XMLStreamException

- If json is null.

createWriter

public abstract XmlWriter createWriter(OutputStream json)

Creates an instance of XmlWriter that writes to an OutputStream.

Parameters:

json - The JSON represented as an OutputStream.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If json is null.

createWriter

public abstract XmlWriter createWriter(Writer json)

Creates an instance of XmlWriter that writes to an Writer.

Parameters:

json - The JSON represented as an Writer.

Returns:

A new instance of XmlWriter.

Throws:

XMLStreamException

- If json is null.

Applies to