Package org.insa.graphs.model.io
Class BinaryWriter
- java.lang.Object
-
- org.insa.graphs.model.io.BinaryWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
BinaryPathWriter
public abstract class BinaryWriter extends java.lang.Object implements java.lang.AutoCloseable, java.io.CloseableBase class for writing binary file.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.DataOutputStreamdos
-
Constructor Summary
Constructors Modifier Constructor Description protectedBinaryWriter(java.io.DataOutputStream dos)Create a new BinaryWriter that writes to the given output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voidwrite24bits(int value)Write a 24-bits integer in BigEndian order to the output stream.
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
write24bits
protected void write24bits(int value) throws java.io.IOExceptionWrite a 24-bits integer in BigEndian order to the output stream.- Parameters:
value- Value to write.- Throws:
java.io.IOException- if an error occurs while writing to the stream.
-
-