This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Are you perhaps talking about something like java.math.BigDecimal? On the other hand - if you want to get a number that somehow characterizes the content of a large file, perhaps you want something like a message digest - see java.security.MessageDigest Bill
Joined: Apr 02, 2004
Ill clarify my question once more
Say theres file of size 1kb These 1024 bytes (1kb) = 1024*16 bits must be representing a final decimal value I need this decimal value and want to perform arithmetic computations on it.
Its easy to get that decimal value for small size file; for bigger files I used BIgInteger and somehow managed it. But after a fixed size I cannot sem to read entire file contents and get that final value maybe ram limitations
What I really want is that say theres a 2GB file then that file can be represented using a unique decimal(integer) value I just want to get that value but cant seem to...
Well, with 2GB of data, you're going to bump into hard limitations of many JVMs. Sun's Linux and Windows JVMs both have heap size limits somewhat below 2GB. Your only option for directly dealing with data of this size would be to go to another language -- C/C++, probably -- and a 64 bit architecture. You can certainly play games whereby only part of the data comes into memory at once, but that adds a lot to the complexity of your code.
I'm quite interested now -- what sort of work are you doing that involves integers with 2 billion digits?