title: Saving Class Type info to file for later use
body: <p>As you know, passing class types is important when programming Android applications.
  One simple example is using an Intent.</p>
  
  <pre><code>Intent i = new Intent(this, MyActivity.class);
  </code></pre>
  
  <p>So it'll be kind of useful in some situations if I can save the class type info to a file for later use, for instance, after reboot.</p>
  
  <pre><code>void saveClassTypeInfo(Class&lt;?&gt; classType, String filename) {
  
  String str = null;
  
  // Some job with classType
  
  FileOutputStream fos = null;
      try {
          fos = new FileOutputStream(filename);
          fos.write(str.getBytes());
          fos.close();
      } catch (Exception e) {
      }
  }
  </code></pre>
  
  <p>If I could save in a certain way like above, then I would be able to put it back to an Intent like this in the future.</p>
  
  <pre><code>Intent i = new Intent(this, restoredClassInfoFromFile);
  </code></pre>
  
  <p>How I can achieve this kind of job? Because <code>Class&lt;?&gt;</code> is not an object, I don't know where to start at all.</p>
  
  <p><strong>[EDIT]
  .class is an object too, so we can save it just like saving an object.</strong></p>