javax.activation.DataSource size question
- by folone
How do I get the amount of physical memory, consumed by the DataSource (specifically — ByteArrayDataSource)? I use ByteArrayDataSource (byte[] bytes, String type) constructor, where I get bytes like this:
String str = "test";
byte[] bytes = str.getBytes();
Would that be str.length() in bytes? Any other ideas?