title: Serialization in Android
body: <p>I am trying to Serialize paint and path in android. When I am write a object to Objectoutputstream the Notserializabale exception is fired. I am also overwite a writeObject() methods in serializabale class .</p>
  
  <p>Here is the code.</p>
  
  <pre><code>public class msgContainar implements Serializable 
  {
  /**
   * 
   */
  public msgContainar()
  {
  
  }
  private static final long serialVersionUID = 1L;
  private Path pathStack;
  private Paint paintStack;
  
  public Path getPathStack() 
  {
      return pathStack;
  }
  
  public void setPathStack(Path pathStack) 
  {
      this.pathStack = pathStack;
  }
  
  public Paint getPaintStack() 
  {
      return paintStack;
  }
  public void setPaintStack(Paint paintStack) 
  {
      this.paintStack = paintStack;
  }
  
  private void writeObject(ObjectOutputStream out) throws IOException
  {
  
      try
      {
      Paint p=new Paint();
      p.set(paintStack);
  
      Path path=new Path();
  
      path.addPath(pathStack);
  
      out.writeObject(path);
      out.writeObject(p);
  
      }catch (Exception e) 
      {
          Log.e("err",""+e);
      }
  
  }
  
  private void readObject(ObjectInputStream in) throws IOException{
  
      try{
      Paint p=new Paint();
      p=paintStack;
  
      Path path=new Path();
  
      path=pathStack;
  
      }catch (Exception e) {
          Log.e("err",""+e);
      }
  }
  }
  </code></pre>