piffffff
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
package fr.iutfbleau.sae.util;
|
||||
import fr.iutfbleau.sae.util.BitOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@@ -99,9 +98,14 @@ public class BitOutputStream {
|
||||
if (fluxFerme) {
|
||||
throw new IOException("Le flux de sortie est fermé");
|
||||
}
|
||||
while (this.positionBit >= 0) {
|
||||
writeBit(0);
|
||||
|
||||
// Si l'octet nes pas vide on le complete avec des 0
|
||||
if(this.positionBit < 7){
|
||||
this.fluxSortie.write(this.octetEnConstruction);
|
||||
this.octetEnConstruction = 0;
|
||||
this.positionBit = 7;
|
||||
}
|
||||
|
||||
this.fluxSortie.flush(); // Force l'écriture dans le flux sous-jacent dans le but de vider le buffer
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user