Update javadoc and clean naming.
This commit is contained in:
@@ -3,24 +3,30 @@ package org.insa.graph.io;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Base class for writing binary file.
|
||||
*
|
||||
*/
|
||||
public abstract class BinaryWriter {
|
||||
|
||||
// Output stream.
|
||||
protected DataOutputStream dos;
|
||||
|
||||
/**
|
||||
* @param dos
|
||||
* Create a new BinaryWriter that writes to the given output stream.
|
||||
*
|
||||
* @param dos Stream to write to.
|
||||
*/
|
||||
protected BinaryWriter(DataOutputStream dos) {
|
||||
this.dos = dos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a 24-bits integer in BigEndian to the output stream.
|
||||
* Write a 24-bits integer in BigEndian order to the output stream.
|
||||
*
|
||||
* @param value
|
||||
* @param value Value to write.
|
||||
*
|
||||
* @throws IOException
|
||||
* @throws IOException if an error occurs while writing to the stream.
|
||||
*/
|
||||
protected void write24bits(int value) throws IOException {
|
||||
dos.writeShort(value >> 8);
|
||||
|
Reference in New Issue
Block a user