Results 1 to 6 of 6
  1. #1
    adarsh_2484 is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Question Can any one help me?

    I am new to java.I have a text file in the server(containing the account information of account holders).It is a long file without any delimiters between to separate different types of data namely account no:,name etc. .I have to download that file to the client and convert it into the format given below.

    "
    char AccNo[12];
    char Name[18];
    unsigned long AvailableBalance;
    unsigned char AccType[5];
    date LastCollectedDate;
    unsigned char Reserve[21]; /*for size 64 */
    "

    How can I do that.Please help me by sending a sample code.

    :confused::confused::confused:

    I think I can create a class having data variables
    "
    char AccNo[12];
    char Name[18];
    unsigned long AvailableBalance;
    unsigned char AccType[5];
    date LastCollectedDate;
    unsigned char Reserve[21]; /*for size 64 */
    "
    I do not no how to proceed.Please help me.
    Last edited by adarsh_2484; 07-24-2008 at 12:33 PM.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    No. Show us your code and we will help you correct it, but we are not going to do it for you.

  3. #3
    Alan-LB's Avatar
    Alan-LB is offline Member
    Join Date
    Jun 2008
    Location
    Junee, NSW, Australia
    Posts
    19
    Rep Power
    0

    Default

    Could be a problem if there really are no field delimiters. The fields must then be of fixed length - as he has indicated - particularly for the name.

    Yet another "very urgent" request - why is it so?

    Alan
    There are 10 types of people - those who understand binary and those who don't!!
    Today is the Beta version of Tomorrow!!

  4. #4
    adarsh_2484 is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Question Please Help me

    Herewith I am attaching my code, for downloading a text file from the server ,along with this message.But It is not working.Please help me to rectify it.

    With Regards
    Adarsh
    Attached Files Attached Files

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,899
    Rep Power
    25

    Default

    What is NOT working? Could you explain a bit more. There are a lot of ways for a program to NOT work.
    If you are having problems with the reading/writing, write a small standalone program to get your code to work.
    download that file to the client and convert it
    I don't see any conversion code! Your code appears to just copy from input to output. Is that what your code is supposed to do?

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    What does "it doesn't work" mean?

    Does it not compile? If not provide the complete compiler message.

    Doe it throw an exception when you run it? If so, provide the complete stacktraces to the errors.

    Does it do something you don't expect? If so, what, exactly, does it do, and why do you believe that to be unexpected.

    Does it not do something that you want it to do? If so, describe exactly what it is was suppossed to do, and what it actually did.

Posting Permissions

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