Is there an easy and fast way to read two bytes from a 23gb large file in java? The Problem is that read() method (FileInputStream) only supports int as offset. Reading chunks of size 2GB in memory takes to long... There musst be a way to skip let's say 15.000.000.000 bytes?
Use nio FileChannel position(long newPosition) method. To get it, call getChannel() on the good old FileInputStream instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With