Class EDIOutputFactory

    • Constructor Detail

      • EDIOutputFactory

        public EDIOutputFactory()
    • Method Detail

      • newFactory

        public static EDIOutputFactory newFactory()
        Create a new instance of the factory. This static method creates a new factory instance. Once an application has obtained a reference to an EDIOutputFactory it can use the factory to configure and obtain stream instances.
        Returns:
        the factory implementation
      • createEDIStreamWriter

        public abstract EDIStreamWriter createEDIStreamWriter​(OutputStream stream)
        Create a new EDIStreamWriter that writes to a stream
        Parameters:
        stream - - the stream to write to
        Returns:
        the writer instance
      • createEDIStreamWriter

        public abstract EDIStreamWriter createEDIStreamWriter​(OutputStream stream,
                                                              String encoding)
                                                       throws EDIStreamException
        Create a new EDIStreamWriter that writes to a stream
        Parameters:
        stream - - the stream to write to
        encoding - - the encoding to use
        Returns:
        the writer instance
        Throws:
        EDIStreamException - when encoding is not supported
      • createXMLStreamWriter

        public abstract XMLStreamWriter createXMLStreamWriter​(EDIStreamWriter writer)
        Creates a new XMLStreamWriter that uses the given writer as its output. XML Elements written to the writer must use the namespaces declared by the constants in EDINamespaces. The sequence of elements is critical and must align with the structure of the intended EDI output to be written via the given EDI writer.
        Parameters:
        writer - the writer used to generate EDI output using the XML writer
        Returns:
        a new XMLStreamWriter