com.io7m.smfj.serializer.api

## Interface SMFSerializerType

- All Superinterfaces:
    AutoCloseable, Closeable
  All Known Implementing Classes:
    SMFBv1Serializer, SMFTV1Serializer

      public interface SMFSerializerType
      extends Closeable

  The type of serializers.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `serializeHeader(SMFHeader header)` Serialize the header data.
    `void` | `serializeMetadata(SMFSchemaIdentifier schema, byte[] data)` Serialize one item of metadata.
    `SMFSerializerDataTrianglesType` | `serializeTrianglesStart()` Start serializing triangles.
    `SMFSerializerDataAttributesNonInterleavedType` | `serializeVertexDataNonInterleavedStart()` Start serializing non-interleaved vertex data.

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### serializeHeader

          void serializeHeader(SMFHeader header)
                        throws IllegalStateException,
                               IOException

      Serialize the header data.

      Parameters:
        `header` - The header
      Throws:
        `IOException` - On I/O errors
        `IllegalStateException` - If the header has already been serialized

    - #### serializeVertexDataNonInterleavedStart

          SMFSerializerDataAttributesNonInterleavedType serializeVertexDataNonInterleavedStart()
                                                                                        throws IllegalStateException,
                                                                                               IOException

      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`.

      Returns:
        A serializer for non-interleaved vertex data values
      Throws:
        `IllegalStateException` - If the header has not yet been serialized
        `IOException` - On I/O errors

    - #### serializeTrianglesStart

          SMFSerializerDataTrianglesType serializeTrianglesStart()
                                                          throws IllegalStateException,
                                                                 IOException

      Start serializing triangles.

      Returns:
        A serializer for triangles
      Throws:
        `IllegalStateException` - If the header has not yet been serialized
        `IOException` - On I/O errors

    - #### serializeMetadata

          void serializeMetadata(SMFSchemaIdentifier schema,
                                 byte[] data)
                          throws IllegalStateException,
                                 IOException

      Serialize one item of metadata.

      Parameters:
        `schema` - The schema ID
        `data` - The data
      Throws:
        `IllegalStateException` - If the header has not yet been serialized
        `IOException` - On I/O errors

Copyright © 2017 <code@io7m.com> http://io7m.com