Package eu.simuline.octave.io.impl
Class StructWriter
- java.lang.Object
-
- eu.simuline.octave.io.spi.OctaveDataWriter<OctaveStruct>
-
- eu.simuline.octave.io.impl.StructWriter
-
public final class StructWriter extends OctaveDataWriter<OctaveStruct>
The writer for the octave type "struct" writing anOctaveStruct
to aWriter
. The format is# type: struct\n # length: ...\n // comment: the following is in a loop of given length
-
-
Constructor Summary
Constructors Constructor Description StructWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<OctaveStruct>
javaType()
Could be OctaveScalar or OctaveMatrix.void
write(Writer writer, OctaveStruct octaveStruct)
-
Methods inherited from class eu.simuline.octave.io.spi.OctaveDataWriter
getOctaveDataWriter
-
-
-
-
Field Detail
-
LENGTH
static final String LENGTH
- See Also:
- Constant Field Values
-
NAME
static final String NAME
- See Also:
- Constant Field Values
-
TYPE_CELL
static final String TYPE_CELL
- See Also:
- Constant Field Values
-
-
Method Detail
-
javaType
public Class<OctaveStruct> javaType()
Description copied from class:OctaveDataWriter
Could be OctaveScalar or OctaveMatrix.- Specified by:
javaType
in classOctaveDataWriter<OctaveStruct>
- Returns:
- the
Class
of theOctaveObject
that this IO handler loads and saves
-
write
public void write(Writer writer, OctaveStruct octaveStruct) throws IOException
- Specified by:
write
in classOctaveDataWriter<OctaveStruct>
- Parameters:
writer
- the Writer to write tooctaveStruct
- the value to write- Throws:
IOException
-
-