Package eu.de4a.iem.xml
Interface IJAXBVersatileReader<T>
-
- Type Parameters:
T- The type to be read
- All Known Implementing Classes:
JAXBVersatileReader
public interface IJAXBVersatileReader<T>Interface for reading XML documents from various sources.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tread(byte[] aXML)Read a document from the specified byte array.default Tread(char[] aXML)Read a document from the specified char array.default Tread(com.helger.commons.io.IHasInputStream aISP)Read a document from the specified input stream provider.default Tread(com.helger.commons.io.resource.IReadableResource aResource)Read a document from the specified resource.default Tread(com.helger.xml.serialize.read.SAXReaderSettings aSettings, InputSource aInputSource)Read a document from the specified input source using the specified SAX reader settings.default Tread(File aFile)Read a document from the specified file.default Tread(InputStream aIS)Read a document from the specified input stream.default Tread(Reader aReader)Read a document from the specified reader.default Tread(String sXML)Read a document from the specified String.default Tread(ByteBuffer aXML)Read a document from the specified byte buffer.default Tread(Path aPath)Read a document from the specified Path.Tread(Source aSource)Read a document from the specified source.Tread(Node aNode)Read a document from the specified DOM node.default Tread(InputSource aInputSource)Read a document from the specified input source.
-
-
-
Method Detail
-
read
@Nullable default T read(@Nonnull InputSource aInputSource)
Read a document from the specified input source. The secure reading feature has affect when using this method.- Parameters:
aInputSource- The source to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull com.helger.xml.serialize.read.SAXReaderSettings aSettings, @Nonnull InputSource aInputSource)
Read a document from the specified input source using the specified SAX reader settings. The secure reading must be enabled in the SAX settings.- Parameters:
aSettings- The SAX Settings to use.aInputSource- The source to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull InputStream aIS)
Read a document from the specified input stream. The secure reading feature has affect when using this method.- Parameters:
aIS- The input stream to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull Reader aReader)
Read a document from the specified reader. The secure reading feature has affect when using this method.- Parameters:
aReader- The reader to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull File aFile)
Read a document from the specified file. The secure reading feature has affect when using this method.- Parameters:
aFile- The file to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull Path aPath)
Read a document from the specified Path. The secure reading feature has affect when using this method.- Parameters:
aPath- The path to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull com.helger.commons.io.resource.IReadableResource aResource)
Read a document from the specified resource. The secure reading feature has affect when using this method.- Parameters:
aResource- The resource to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull com.helger.commons.io.IHasInputStream aISP)
Read a document from the specified input stream provider. The secure reading feature has affect when using this method.- Parameters:
aISP- The input stream provider to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull byte[] aXML)
Read a document from the specified byte array. The secure reading feature has affect when using this method.- Parameters:
aXML- The XML bytes to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull ByteBuffer aXML)
Read a document from the specified byte buffer. The secure reading feature has affect when using this method.- Parameters:
aXML- The XML bytes to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull String sXML)
Read a document from the specified String. The secure reading feature has affect when using this method.- Parameters:
sXML- The XML string to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable default T read(@Nonnull char[] aXML)
Read a document from the specified char array. The secure reading feature has affect when using this method.- Parameters:
aXML- The XML string to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable T read(@Nonnull Source aSource)
Read a document from the specified source. The secure reading feature has NO affect when using this method because the parameter type is too generic.- Parameters:
aSource- The source to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable T read(@Nonnull Node aNode)
Read a document from the specified DOM node. The secure reading feature has NO affect when using this method because no parsing happens! To ensure secure reading the Node must first be serialized to a String and be parsed again!- Parameters:
aNode- The DOM node to read. May not benull.- Returns:
nullin case reading fails.
-
-