import java.io.*;

public class byteStreamIt
{
public static void main(String [] args)
{

gridTestSer anyObject = new gridTestSer();
byte[] buf;
ByteArrayInputStream source;
   	       
    try {
	   // Serialize to a byte array
	   ByteArrayOutputStream  target  = new ByteArrayOutputStream() ;
       ObjectOutputStream oos = new ObjectOutputStream( target );
	   oos.writeObject( anyObject );
	   oos.close();
	   	   	   
	   // Get the bytes of the serialized object
	   buf = target.toByteArray();
	   source = new ByteArrayInputStream( buf );


           try {
	       // now read it and use it
           ObjectInputStream ois = new ObjectInputStream( source );   
		   gridTestSer buttons = (gridTestSer) ois.readObject();
	       buttons.startUp();
           ois.close(); 
           } 
		   catch (ClassNotFoundException c)
		   {
		   }

       } 
	catch (IOException e) 
	   {    
	   } // end catch


} // end main

} // end class

