@ParametersAreNonnullByDefault public abstract class AbstractStreamReader extends AbstractReader<InputStream>
Reader that reads data from an InputStream.| Constructor and Description | 
|---|
| AbstractStreamReader() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | flushCurrentElement()Finalizes the current element and sends all delayed notifications to handlers. | 
| ProxyElement | getCurrentElement()Returns the current element. | 
| Id | getPreviousId()Returns the identifier of the previous element. | 
| void | ignoreCurrentElement()Asks to ignore the current element. | 
| protected abstract boolean | isSpecialAttribute(String prefix,
                  String name,
                  String value)Defines if the attribute represented with the parameters is a special attribute as 'xsi:type', 'xmi:id' or
 'xmi:idref'. | 
| abstract void | parse(InputStream stream)Parses the content of the  stream. | 
| void | read(InputStream source)Reads an  Object. | 
| protected void | readAttribute(String prefix,
             String name,
             String value)Reads a new attribute of the current element. | 
| protected void | readEndDocument()Reads the end of the current document. | 
| protected void | readEndElement()Reads the end of an element. | 
| protected void | readMetaClass(String prefixedValue)Reads a meta-class attribute from the  prefixedValue, and defines is as the meta-class of the givenelement. | 
| protected void | readNamespace(String prefix,
             String uri)Reads a  ProxyPackagedeclaration. | 
| protected void | readSimpleElement(String uri,
                 String name,
                 String value)Reads a new simple element, as  <name>value</name>. | 
| protected void | readStartDocument()Reads the start of the document. | 
| protected void | readStartElement(String uri,
                String name)Reads the start of a new element. | 
addNext, createProcessorsaddNext, notifyAttribute, notifyComplete, notifyEndElement, notifyInitialize, notifyReference, notifyStartElement, supportsMultiTargetsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyAttribute, notifyComplete, notifyEndElement, notifyInitialize, notifyReference, notifyStartElementpublic final void read(InputStream source) throws IOException
ReaderObject.source - the object to readIOException - if an error occurred during the I/O processpublic abstract void parse(InputStream stream) throws IOException
stream.stream - the stream to readIOException - if an error occurred during the I/O process@Nonnull public Id getPreviousId()
@Nonnull public ProxyElement getCurrentElement()
public void ignoreCurrentElement()
protected final void readStartDocument()
                                throws IOException
IOExceptionprotected final void readStartElement(@Nullable String uri, String name)
 Note: An element must be flushed with the flushCurrentElement() method after analysing all its
 attributes.
uri - the namespace's URI of the elementname - the name of the elementprotected final void readSimpleElement(@Nullable String uri, String name, String value) throws IOException
<name>value</name>.uri - the namespace's URI of the elementname - the name of the elementvalue - the literal value of the elementIOExceptionprotected final void readNamespace(String prefix, String uri)
ProxyPackage declaration.prefix - the prefix of the namespaceuri - the URI of the namespaceProxyPackage.Registry#register(String, String)protected final void flushCurrentElement()
                                  throws IOException
IOExceptionprotected final void readAttribute(@Nullable String prefix, String name, String value) throws IOException
prefix - the namespace's prefix of the attributename - the name of the attributevalue - the value of the attributeIOExceptionprotected final void readMetaClass(String prefixedValue)
prefixedValue, and defines is as the meta-class of the given element.prefixedValue - the value representing the meta-classPATTERN_PREFIXED_VALUEprotected final void readEndElement()
                             throws IOException
IOExceptionprotected final void readEndDocument()
                              throws IOException
IOExceptionprotected abstract boolean isSpecialAttribute(@Nullable String prefix, String name, String value) throws IOException
prefix - the namespace's prefix of the attributename - the name of the attributevalue - the value of the attributetrue if the given feature is a special featureIOExceptionCopyright © 2013–2019 Atlanmod. All rights reserved.