public final class SMFBv1Serializer extends Object implements SMFSerializerType
| Constructor and Description |
|---|
SMFBv1Serializer(SMFFormatVersion in_version,
URI in_uri,
OutputStream in_stream)
Construct a serializer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
serializeHeader(SMFHeader in_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.
|
public SMFBv1Serializer(SMFFormatVersion in_version, URI in_uri, OutputStream in_stream)
in_version - The output format versionin_uri - The URI for diagnosticsin_stream - The output streampublic void serializeHeader(SMFHeader in_header) throws IllegalStateException, IOException
SMFSerializerTypeSerialize the header data.
serializeHeader in interface SMFSerializerTypein_header - The headerIllegalStateException - If the header has already been serializedIOException - On I/O errorspublic SMFSerializerDataAttributesNonInterleavedType serializeVertexDataNonInterleavedStart() throws IllegalStateException, IOException
SMFSerializerTypeStart 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.
serializeVertexDataNonInterleavedStart in interface SMFSerializerTypeIllegalStateException - If the header has not yet been serializedIOException - On I/O errorspublic SMFSerializerDataTrianglesType serializeTrianglesStart() throws IllegalStateException, IOException
SMFSerializerTypeStart serializing triangles.
serializeTrianglesStart in interface SMFSerializerTypeIllegalStateException - If the header has not yet been serializedIOException - On I/O errorspublic void serializeMetadata(SMFSchemaIdentifier schema, byte[] data) throws IllegalStateException, IOException
SMFSerializerTypeSerialize one item of metadata.
serializeMetadata in interface SMFSerializerTypeschema - The schema IDdata - The dataIllegalStateException - If the header has not yet been serializedIOException - On I/O errorspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017 <code@io7m.com> http://io7m.com