Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29

Thread: Reading a files header, hex

  1. #26
    Junior Member
    Join Date
    Feb 2013
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Reading a files header, hex

    is there any chance you can write this here for me, i have been stuck on this for a week now and its frustrating, i am only a beginner at programming and i learn better when i see actual java material

  2. #27
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Reading a files header, hex

    From post #20
    fis.read() // reads a byte from file
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    tomb1992 (March 5th, 2013)

  4. #28
    Junior Member
    Join Date
    Feb 2013
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Reading a files header, hex

    cheers, you may think i'm lazy lol but ive been working so hard on this, my coding together comes to about 600/700 lines and its frustrating that this is probably the most important part and its about 3 lines long and i cant do it, thanks for your help anyways

  5. #29
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Reading a files header, hex

    learn better when i see actual java material
    The code in post #20 reads bytes from the file into an int variable and tests if that variable has a -1 value. The statements need to be changed around to be used in a for loop instead of a while loop.
    If you don't understand my answer, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. java GUI , reading in files
    By zerocool18 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: February 25th, 2013, 07:23 PM
  2. Reading files and writing files
    By ProgrammerNewbie in forum What's Wrong With My Code?
    Replies: 5
    Last Post: December 3rd, 2012, 12:13 AM
  3. reading .txt files
    By deependeroracle in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: February 8th, 2012, 12:47 PM
  4. Reading In Then Writing Out Massive Files
    By aussiemcgr in forum Java Theory & Questions
    Replies: 3
    Last Post: July 28th, 2011, 07:00 PM
  5. Reading many files using a scanner
    By jayjames90 in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: October 22nd, 2009, 04:35 PM

Tags for this Thread