• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help in this 0x8FFFFFF

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
In a program of MappedFiles i have seen this 0x8FFFFFF. It is used to specify the size of the file i.e 128 MB. How is that code generated and how can i get the code for different numbers. Can any body please help. More over i want to know the difference between file length and file size. I am confused because file length is also given in MB.


Thanks and Regards
alexander


 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a number (150994943) in base-16, otherwise known as hexadecimal. Your calculator probably has a hexadecimal mode you can use to convert numbers; the Windows calculator accessory does, too.

File length and file size would both mean the same thing.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for replying.
Can i create a file without specifying the size? I have created one and wrote in that line by line i.e the out put is below

name0 Marks0
name1 Marks1
name2 Marks2
name3 Marks3
name4 Marks4
name5 Marks5
name6 Marks6
name7 Marks7
name8 Marks8
name9 Marks9
name10 Marks10



Now how can i delete a particular line from this.

Thanks in advance
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you might be coming a mainframe background where "random access" files were the norm. Java's model of a file is just like the UNIX one: it's a sequence of bytes, nothing more, nothing less. The only way to delete a line from a file is to copy the file to new file, leaving out that line, deleting the original file, and renaming to new file to the old name.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic