Results 1 to 3 of 3

Thread: File size

  1. #1
    eva
    eva is offline Member
    Join Date
    Dec 2007
    Posts
    49
    Rep Power
    0

    Default File size

    I have created a file object using following statement:

    Java Code:
    File file = new File("C:\\demo.txt");
    I want to get the size of the file. How this can be done?

    -PEACE

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    The File class api has a length method that returns a long.

  3. #3
    eva
    eva is offline Member
    Join Date
    Dec 2007
    Posts
    49
    Rep Power
    0

Similar Threads

  1. how to set font size for a xml value
    By bala_kj in forum Advanced Java
    Replies: 3
    Last Post: 04-01-2008, 11:00 AM
  2. String max size
    By eva in forum New To Java
    Replies: 0
    Last Post: 01-31-2008, 02:29 PM
  3. Object size
    By kavithas in forum New To Java
    Replies: 0
    Last Post: 11-30-2007, 12:00 PM
  4. how to set an image size
    By valery in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 08:27 PM
  5. Replies: 1
    Last Post: 05-20-2007, 08:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •