Class ArtifactAstSerializerMetadataSerializer

java.lang.Object
org.mule.runtime.ast.internal.serialization.ArtifactAstSerializerMetadataSerializer

public class ArtifactAstSerializerMetadataSerializer extends Object
This class deals with the adding/reading into/from an input stream the metadata associated to ArtifactAst serialization. This metadata is generated during the artifact's serialization and must be added to the resulting InputStream so that it can be then read in order to use the correct deserializing implementation when deserializing.

The metadata is added to the stream in the form of a header string in the first line of the InputStream. This header string is composed by the serializer's id and the version, delimited by a pound sign (#). The max allowed length of the header string is 1001 as determined by the MAX_HEADER_LINE_LENGTH constant.