File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help in this 0x8FFFFFF

 
adeeb alexander
Ranch Hand
Posts: 268
  • 0
  • Mark post as helpful
  • send pies
  • 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


 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic