Results 1 to 5 of 5

Thread: Please help

  1. #1
    mecrazycoder is offline Member
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0

    Exclamation Please help

    What will be the advantage of reading a file into byte array except coding complexity?????

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    welcome to our community. :)

    Please choose the correct sub-forum next time, when you ask a question here. Read our FAQ page as well, you can find lots of useful information there.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Regarding your question.

    Actually if you are using a byte array to read a file, I don't think there is any code complexity. I'm not sure what contest you said that.

    Major advantage of this I've seen the simplicity of handling the content in the file, in contest of the design level. Most of the time you want to convert the content into a string. You can do it in a single step. But you cannot the maximum file size more than Integer.MAX_VALUE. So periodically you have to check the file size, cause real problems when you are deal with larger problems.

    Those are related to design level of your application.

  4. #4
    mecrazycoder is offline Member
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0

    Default

    Thanks dude.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Tags for this Thread

Posting Permissions

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