- java.lang.Object
-
- io.xlate.edi.stream.PropertySupport
-
- io.xlate.edi.stream.EDIInputFactory
-
- Direct Known Subclasses:
StaEDIInputFactory
public abstract class EDIInputFactory extends PropertySupport
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDI_VALIDATE_CONTROL_STRUCTURE-
Fields inherited from class io.xlate.edi.stream.PropertySupport
properties, supportedProperties
-
-
Constructor Summary
Constructors Constructor Description EDIInputFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract EDIStreamReadercreateEDIStreamReader(InputStream stream)Creates a newEDIStreamReaderusing the givenInputStream(with default encoding).abstract EDIStreamReadercreateEDIStreamReader(InputStream stream, Schema schema)Creates a newEDIStreamReaderusing the givenInputStream(with default encoding) which uses theSchemafor validation of the input's control structures (interchange, group, transaction).abstract EDIStreamReadercreateEDIStreamReader(InputStream stream, String encoding)Creates a newEDIStreamReaderusing the givenInputStreamand encoding.abstract EDIStreamReadercreateEDIStreamReader(InputStream stream, String encoding, Schema schema)Creates a newEDIStreamReaderusing the givenInputStreamand encoding which uses theSchemafor validation of the input's control structures (interchange, group, transaction).abstract EDIStreamReadercreateFilteredReader(EDIStreamReader reader, EDIStreamFilter filter)Creates a newEDIStreamReaderby wrapping the given reader with theEDIStreamFilterfilter.static EDIInputFactorynewFactory()Create a new instance of the factory.-
Methods inherited from class io.xlate.edi.stream.PropertySupport
getProperty, isPropertySupported, setProperty
-
-
-
-
Field Detail
-
EDI_VALIDATE_CONTROL_STRUCTURE
public static final String EDI_VALIDATE_CONTROL_STRUCTURE
- See Also:
- Constant Field Values
-
-
Method Detail
-
newFactory
public static EDIInputFactory 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 EDIInputFactory it can use the factory to configure and obtain stream instances.- Returns:
- the factory implementation
-
createEDIStreamReader
public abstract EDIStreamReader createEDIStreamReader(InputStream stream)
Creates a newEDIStreamReaderusing the givenInputStream(with default encoding).- Parameters:
stream-InputStreamfrom which the EDI data will be read- Returns:
- a new
EDIStreamReaderwhich reads from the stream
-
createEDIStreamReader
public abstract EDIStreamReader createEDIStreamReader(InputStream stream, String encoding) throws EDIStreamException
Creates a newEDIStreamReaderusing the givenInputStreamand encoding.- Parameters:
stream-InputStreamfrom which the EDI data will be readencoding- character encoding of the stream- Returns:
- a new
EDIStreamReaderwhich reads from the stream - Throws:
EDIStreamException- when encoding is not supported
-
createEDIStreamReader
public abstract EDIStreamReader createEDIStreamReader(InputStream stream, Schema schema)
Creates a newEDIStreamReaderusing the givenInputStream(with default encoding) which uses theSchemafor validation of the input's control structures (interchange, group, transaction). Note that a separate schema for validation of messages/transactions may be passed directly to theEDIStreamReaderonce the type and version of the messages is known.- Parameters:
stream-InputStreamfrom which the EDI data will be readschema-Schemafor control structure validation- Returns:
- a new
EDIStreamReaderwhich reads from the stream
-
createEDIStreamReader
public abstract EDIStreamReader createEDIStreamReader(InputStream stream, String encoding, Schema schema) throws EDIStreamException
Creates a newEDIStreamReaderusing the givenInputStreamand encoding which uses theSchemafor validation of the input's control structures (interchange, group, transaction). Note that a separate schema for validation of messages/transactions may be passed directly to theEDIStreamReaderonce the type and version of the messages is known.- Parameters:
stream-InputStreamfrom which the EDI data will be readencoding- character encoding of the streamschema-Schemafor control structure validation- Returns:
- a new
EDIStreamReaderwhich reads from the stream - Throws:
EDIStreamException- when encoding is not supported
-
createFilteredReader
public abstract EDIStreamReader createFilteredReader(EDIStreamReader reader, EDIStreamFilter filter)
Creates a newEDIStreamReaderby wrapping the given reader with theEDIStreamFilterfilter.- Parameters:
reader- the reader to wrapfilter- a filter to wrap the given reader- Returns:
- a new
EDIStreamReaderwhich uses filter
-
-