title: Format received long number as a decimal one with custom format
body: <p>I'm receiving a number formatted as long. Although i'm receiving this number as a long I now that the last 3 digits correspond to a decimal part so I want to show the number formatted with grouping and a decimal separator.</p>
  
  <p>Example: if I receive the number <code>11111111111</code> I want it to be shown like <code>11 111 111.111</code></p>
  
  <p>I have this code:</p>
  
  <pre><code>    DecimalFormat formatter = new DecimalFormat();
      DecimalFormatSymbols symbols = new DecimalFormatSymbols();
      formatter.setGroupingUsed(true);
      symbols.setDecimalSeparator('.');
      symbols.setGroupingSeparator(' ');
      formatter.setDecimalFormatSymbols(symbols);
  
      long valueAsLong = 11111111111L;
      double value = (double) valueAsLong / 1000;
  
      System.out.println(formatter.format(valueAsLong));
      System.out.println(formatter.format(value));
  </code></pre>
  
  <p>I want to know if I can achieve this without that cast, that is, setting a formatter that receives a <code>long</code> and format the number the way I want.</p>