private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
  ObjectInputStream.GetField fields=stream.readFields();
  this.symbols=(DecimalFormatSymbols)fields.get("symbols",null);
  initNative("");
  ndf.setPositivePrefix((String)fields.get("positivePrefix",""));
  ndf.setPositiveSuffix((String)fields.get("positiveSuffix",""));
  ndf.setNegativePrefix((String)fields.get("negativePrefix","-"));
  ndf.setNegativeSuffix((String)fields.get("negativeSuffix",""));
  ndf.setMultiplier(fields.get("multiplier",1));
  ndf.setGroupingSize(fields.get("groupingSize",(byte)3));
  ndf.setGroupingUsed(fields.get("groupingUsed",true));
  ndf.setDecimalSeparatorAlwaysShown(fields.get("decimalSeparatorAlwaysShown",false));
  setRoundingMode((RoundingMode)fields.get("roundingMode",RoundingMode.HALF_EVEN));
  final int maximumIntegerDigits=fields.get("maximumIntegerDigits",309);
  final int minimumIntegerDigits=fields.get("minimumIntegerDigits",309);
  final int maximumFractionDigits=fields.get("maximumFractionDigits",340);
  final int minimumFractionDigits=fields.get("minimumFractionDigits",340);
  ndf.setMaximumIntegerDigits(maximumIntegerDigits);
  super.setMaximumIntegerDigits(ndf.getMaximumIntegerDigits());
  setMinimumIntegerDigits(minimumIntegerDigits);
  setMinimumFractionDigits(minimumFractionDigits);
  setMaximumFractionDigits(maximumFractionDigits);
  setParseBigDecimal(fields.get("parseBigDecimal",false));
  if (fields.get("serialVersionOnStream",0) < 3) {
    setMaximumIntegerDigits(super.getMaximumIntegerDigits());
    setMinimumIntegerDigits(super.getMinimumIntegerDigits());
    setMaximumFractionDigits(super.getMaximumFractionDigits());
    setMinimumFractionDigits(super.getMinimumFractionDigits());
  }
}

private void readObject ( ObjectInputStream stream ) throws IOException , ClassNotFoundException { ObjectInputStream . GetField fields = stream . readFields ( ) ; this . symbols = ( DecimalFormatSymbols ) fields . get ( "symbols" , null ) ; initNative ( "" ) ; ndf . setPositivePrefix ( ( String ) fields . get ( "positivePrefix" , "" ) ) ; ndf . setPositiveSuffix ( ( String ) fields . get ( "positiveSuffix" , "" ) ) ; ndf . setNegativePrefix ( ( String ) fields . get ( "negativePrefix" , "-" ) ) ; ndf . setNegativeSuffix ( ( String ) fields . get ( "negativeSuffix" , "" ) ) ; ndf . setMultiplier ( fields . get ( "multiplier" , 1 ) ) ; ndf . setGroupingSize ( fields . get ( "groupingSize" , ( byte ) 3 ) ) ; ndf . setGroupingUsed ( fields . get ( "groupingUsed" , true ) ) ; ndf . setDecimalSeparatorAlwaysShown ( fields . get ( "decimalSeparatorAlwaysShown" , false ) ) ; setRoundingMode ( ( RoundingMode ) fields . get ( "roundingMode" , RoundingMode . HALF_EVEN ) ) ; final int maximumIntegerDigits = fields . get ( "maximumIntegerDigits" , 309 ) ; final int minimumIntegerDigits = fields . get ( "minimumIntegerDigits" , 309 ) ; final int maximumFractionDigits = fields . get ( "maximumFractionDigits" , 340 ) ; final int minimumFractionDigits = fields . get ( "minimumFractionDigits" , 340 ) ; ndf . setMaximumIntegerDigits ( maximumIntegerDigits ) ; super . setMaximumIntegerDigits ( ndf . getMaximumIntegerDigits ( ) ) ; setMinimumIntegerDigits ( minimumIntegerDigits ) ; setMinimumFractionDigits ( minimumFractionDigits ) ; setMaximumFractionDigits ( maximumFractionDigits ) ; setParseBigDecimal ( fields . get ( "parseBigDecimal" , false ) ) ; if ( fields . get ( "serialVersionOnStream" , 0 ) < 3 ) { setMaximumIntegerDigits ( super . getMaximumIntegerDigits ( ) ) ; setMinimumIntegerDigits ( super . getMinimumIntegerDigits ( ) ) ; setMaximumFractionDigits ( super . getMaximumFractionDigits ( ) ) ; setMinimumFractionDigits ( super . getMinimumFractionDigits ( ) ) ; } }
reads serialized fields following serialized forms specified by java specification .
