public void writeState(DataOutputStream stream) throws IOException {
  int len=mt.length;
  for (int x=0; x < len; x++)   stream.writeInt(mt[x]);
  len=mag01.length;
  for (int x=0; x < len; x++)   stream.writeInt(mag01[x]);
  stream.writeInt(mti);
  stream.writeDouble(__nextNextGaussian);
  stream.writeBoolean(__haveNextNextGaussian);
}

public void writeState ( DataOutputStream stream ) throws IOException { int len = mt . length ; for ( int x = 0 ; x < len ; x ++ ) stream . writeInt ( mt [ x ] ) ; len = mag01 . length ; for ( int x = 0 ; x < len ; x ++ ) stream . writeInt ( mag01 [ x ] ) ; stream . writeInt ( mti ) ; stream . writeDouble ( __nextNextGaussian ) ; stream . writeBoolean ( __haveNextNextGaussian ) ; }
writes the entire state of the mersennetwister rng to the stream
