title: determine the number of characters printed to an output stream in java
body: <p>Is there any way to determine the number of characters printed to an output stream in java?</p>
  
  <p>Like for example in C the printf returns the number of characters printed in that particular statement.</p>
  
  <pre><code>int i=printf("hello");
  printf(i);
  </code></pre>
  
  <p>the above piece of code would print hello and 4;</p>
  
  <p>is there any way to achieve the same in Java?</p>