title: javax.activation.DataSource size question
body: <p>How do I get the amount of physical memory, consumed by the <a href="http://lia.deis.unibo.it/Courses/TecnologieWeb0708/materiale/laboratorio/guide/j5eeapi/javax/activation/DataSource.html" rel="nofollow noreferrer"><code>DataSource</code></a> (specifically — <a href="http://java.sun.com/products/javamail/javadocs/javax/mail/util/ByteArrayDataSource.html" rel="nofollow noreferrer"><code>ByteArrayDataSource</code></a>)? I use <code>javax.mail.util.ByteArrayDataSource (byte[] bytes, String type)</code> constructor, where I get <code>bytes</code> like this:</p>
  
  <pre><code>String str = "test";
  byte[] bytes = str.getBytes();
  </code></pre>
  
  <p>Would that be <code>str.length()</code> in bytes? Any other ideas?</p>