@Override public void writeToParcel(Parcel out,int flags){
  out.writeParcelable(mKmlRoot,flags);
  out.writeInt(mStyles.size());
  for (  String key : mStyles.keySet()) {
    out.writeString(key);
    out.writeParcelable(mStyles.get(key),flags);
  }
  out.writeInt(mMaxStyleId);
  if (mLocalFile != null)   out.writeString(mLocalFile.getAbsolutePath());
 else   out.writeString("");
}

@ Override public void writeToParcel ( Parcel out , int flags ) { out . writeParcelable ( mKmlRoot , flags ) ; out . writeInt ( mStyles . size ( ) ) ; for ( String key : mStyles . keySet ( ) ) { out . writeString ( key ) ; out . writeParcelable ( mStyles . get ( key ) , flags ) ; } out . writeInt ( mMaxStyleId ) ; if ( mLocalFile != null ) out . writeString ( mLocalFile . getAbsolutePath ( ) ) ; else out . writeString ( "" ) ; }
warning - parcel mechanism doesn ' t work with very large objects . refer to android doc , and use carefully .
