Class SMFTV1Serializer

  • All Implemented Interfaces:
    SMFSerializerType, java.io.Closeable, java.lang.AutoCloseable

    public final class SMFTV1Serializer
    extends java.lang.Object
    implements SMFSerializerType
    A serializer.
    • Constructor Detail

      • SMFTV1Serializer

        public SMFTV1Serializer​(SMFFormatVersion in_version,
                                java.net.URI in_uri,
                                java.io.OutputStream in_stream)
        Construct a serializer.
        Parameters:
        in_version - The format version
        in_uri - The URI of the target, for diagnostic purposes
        in_stream - An output stream
    • Method Detail

      • serializeHeader

        public void serializeHeader​(SMFHeader in_header)
                             throws java.io.IOException
        Description copied from interface: SMFSerializerType

        Serialize the header data.

        Specified by:
        serializeHeader in interface SMFSerializerType
        Parameters:
        in_header - The header
        Throws:
        java.io.IOException - On I/O errors
      • serializeVertexDataNonInterleavedStart

        public SMFSerializerDataAttributesNonInterleavedType serializeVertexDataNonInterleavedStart()
                                                                                             throws java.io.IOException
        Description copied from interface: SMFSerializerType

        Start serializing non-interleaved vertex data.

        If the method raises an exception, the serializer is considered to have failed and all subsequent method calls will raise IllegalArgumentException.

        Specified by:
        serializeVertexDataNonInterleavedStart in interface SMFSerializerType
        Returns:
        A serializer for non-interleaved vertex data values
        Throws:
        java.io.IOException - On I/O errors
      • serializeMetadata

        public void serializeMetadata​(SMFSchemaIdentifier schema,
                                      byte[] data)
                               throws java.lang.IllegalStateException,
                                      java.io.IOException
        Description copied from interface: SMFSerializerType

        Serialize one item of metadata.

        Specified by:
        serializeMetadata in interface SMFSerializerType
        Parameters:
        schema - The schema ID
        data - The data
        Throws:
        java.lang.IllegalStateException - If the header has not yet been serialized
        java.io.IOException - On I/O errors
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException