Package com.powsybl.commons.binary
Class BinWriter
java.lang.Object
com.powsybl.commons.binary.BinWriter
- All Implemented Interfaces:
TreeDataWriter
,AutoCloseable
- Author:
- Florian Dupuy <florian.dupuy at rte-france.com>
-
Constructor Summary
ConstructorDescriptionBinWriter
(OutputStream outputStream, byte[] binaryMagicNumber, String rootVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
setVersions
(Map<String, String> extensionVersions) void
writeBooleanAttribute
(String name, boolean value) void
writeBooleanAttribute
(String name, boolean value, boolean absentValue) void
writeDoubleAttribute
(String name, double value) void
writeDoubleAttribute
(String name, double value, double absentValue) void
void
<E extends Enum<E>>
voidwriteEnumAttribute
(String name, E value) void
writeFloatAttribute
(String name, float value) void
writeIntArrayAttribute
(String name, Collection<Integer> values) void
writeIntAttribute
(String name, int value) void
writeIntAttribute
(String name, int value, int absentValue) void
writeNamespace
(String prefix, String namespace) void
writeNodeContent
(String value) void
writeOptionalBooleanAttribute
(String name, Boolean value) void
writeOptionalDoubleAttribute
(String name, Double value) void
writeOptionalIntAttribute
(String name, Integer value) void
writeStartNode
(String namespace, String name) void
void
writeStringArrayAttribute
(String name, Collection<String> values) void
writeStringAttribute
(String name, String value)
-
Constructor Details
-
BinWriter
-
-
Method Details
-
writeStartNodes
public void writeStartNodes()- Specified by:
writeStartNodes
in interfaceTreeDataWriter
-
writeEndNodes
public void writeEndNodes()- Specified by:
writeEndNodes
in interfaceTreeDataWriter
-
writeStartNode
- Specified by:
writeStartNode
in interfaceTreeDataWriter
-
writeEndNode
public void writeEndNode()- Specified by:
writeEndNode
in interfaceTreeDataWriter
-
writeNamespace
- Specified by:
writeNamespace
in interfaceTreeDataWriter
-
writeNodeContent
- Specified by:
writeNodeContent
in interfaceTreeDataWriter
-
writeStringAttribute
- Specified by:
writeStringAttribute
in interfaceTreeDataWriter
-
writeFloatAttribute
- Specified by:
writeFloatAttribute
in interfaceTreeDataWriter
-
writeDoubleAttribute
- Specified by:
writeDoubleAttribute
in interfaceTreeDataWriter
-
writeDoubleAttribute
- Specified by:
writeDoubleAttribute
in interfaceTreeDataWriter
-
writeOptionalDoubleAttribute
- Specified by:
writeOptionalDoubleAttribute
in interfaceTreeDataWriter
-
writeIntAttribute
- Specified by:
writeIntAttribute
in interfaceTreeDataWriter
-
writeIntAttribute
- Specified by:
writeIntAttribute
in interfaceTreeDataWriter
-
writeOptionalIntAttribute
- Specified by:
writeOptionalIntAttribute
in interfaceTreeDataWriter
-
writeIntArrayAttribute
- Specified by:
writeIntArrayAttribute
in interfaceTreeDataWriter
-
writeStringArrayAttribute
- Specified by:
writeStringArrayAttribute
in interfaceTreeDataWriter
-
writeEnumAttribute
- Specified by:
writeEnumAttribute
in interfaceTreeDataWriter
-
writeBooleanAttribute
- Specified by:
writeBooleanAttribute
in interfaceTreeDataWriter
-
writeBooleanAttribute
- Specified by:
writeBooleanAttribute
in interfaceTreeDataWriter
-
writeOptionalBooleanAttribute
- Specified by:
writeOptionalBooleanAttribute
in interfaceTreeDataWriter
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTreeDataWriter
-
setVersions
- Specified by:
setVersions
in interfaceTreeDataWriter
-