Code example for DataOutputStream

Methods: writeBoolean, writeFloat

0
        this.d = stream.readBoolean();
    } 
 
    @Override 
    public void write(DataOutputStream stream) throws IOException {
        stream.writeFloat(this.a);
        stream.writeFloat(this.b);
        stream.writeFloat(this.e);
        stream.writeFloat(this.f);
        stream.writeBoolean(this.c);
        stream.writeBoolean(this.d);
    } 
 
    @Override 
    public int length() { 
        return 18; 
    } 
 
    @Override 
    public byte getId() { 
        return 27;