Friday, July 31, 2020

JAVA Code to convert Bytes into MB

Here is the JAVA Code to convert bytes in MB upto 1 decimal place.

public void getSizeInMB()
    {
        long sizeinBytes = 200*1024;
                long sizeInKB = sizeinBytes/1024;
                long sizeInMBInt = sizeInKB/1024;
                float sizeInMB = sizeInKB/1024.0f;
                String size = sizeInMB+"";

                int k = size.indexOf('.');
                size = sizeInMBInt+"."+size.charAt(k+1);
   
      System.out.print(size);
    }

14 comments:

  1. 토토사이트 What an interesting story! 먹튀검증I'm glad I finally found 안전놀이터what I was looking for.토토사이트 Thank you for letting me see this useful information. 꽁머니There's a story on my site that you might find interesting. 꽁머니I really hope you visit once.안전놀이터 I will also visit this site often.스포츠중계 In addition, https://mtboan.com/COVID-19 is becoming a problem all over the world these days. 먹튀보안관 I hope there's no harm to you and your family. 먹튀가디언 Thank youhttps://twiddeo.com/And, 먹튀검증토토사이트 Already 2020 is nearing the end. 메이저토토사이트 There were so many incidents this year. 사설토토 I am still feeling a lot of 토토사이트 inconvenience and birds due to 메이저토토사이트 the special virus. 먹튀사이트조회 It's already getting 토토사이트 a lot colder, 안전놀이터 so make sure to 먹튀검증 pack warm clothes. 먹튀요기요 Please spend the rest of https://mtygy.com/ your life happy. 메이저놀이터 Then, have a nice day!놀이터토토

    ReplyDelete
  2. It is really what I wanted to see hope in future you will continue for sharing such a excellent post. 먹튀검증

    ReplyDelete
  3. hi sir you have written a very important something. I like your every point you dropped 슈어벳

    ReplyDelete
  4. "Hi there, I enjoy reading all of your article.
    I like to write a little comment to support you." 토토사이트

    ReplyDelete
  5. "It's very effortless to find out anyy topic onn net as compared to books, ass I found this post
    at this web page." 먹튀폴리스

    ReplyDelete
  6. "Nice post. I used to be checking constantly this blog and I am
    inspired! Very useful information particularly the remaining section �� I maintain such info
    a lot. I was looking for this particular info for a very lengthy time.

    Thank you and best of luck." 먹튀폴리스

    ReplyDelete
  7. Very good post.Really looking forward to read more. Really Great. 토토

    ReplyDelete
  8. "Really enjoyed this blog article.Much thanks again. Cool.

    " 토토

    ReplyDelete
  9. "Excellent post. I was checking continuously this blog and I am impressed!
    Very helpful info specially the last part :) I care for such info a lot.
    I was seeking this certain info for a long time.
    Thank youu and good luck." 메이저사이트

    ReplyDelete
  10. Whenever I have some free time, I visit blogs to get some useful info. Today, I found your blog with the help of Google ; I found it one of the most informative blog 토토사이트

    ReplyDelete
  11. "Really enjoyed this blog article.Much thanks again. Cool.

    " 메이저사이트

    ReplyDelete
  12. "Every weekend i used to visit this web page, because i want enjoyment,
    for the reason that this this web site conations really nice funny material too." 파워볼사이트

    ReplyDelete
  13. This was really an interesting topic and I kinda agree with what you have mentioned here! สล็อตแตกง่าย

    ReplyDelete