S
Stefan Ram
I am holding byte blocks (of, e.g., 16 bytes) in a large byte
array (of n·16 bytes) sorted with respect to those blocks.
I also have another unsorted byte array of »recent additions«.
It is anticipated that often it has to be determined whether a
certain block is contained in any of those two arrays.
I.e., both blocks together implement a »set of byte blocks«.
Eventually, the recent additions will be sorted and then both
arrays will be written out to a file. The file is to contain
the byte blocks of both arrays in a sorted order, so the next
byte block written is chosen from both arrays to be the
smallest left.
I assume that I could implement the file access via either
java.io or java.nio. So, what should I choose?
In the web I read, that »NIO will be particularly relevant for
developers of high-performance applications such as database
engines«. My pair of arrays might be considered to be a kind
of »database engine«. But still I do not know whether
java.nio will have any benefits in my case.
array (of n·16 bytes) sorted with respect to those blocks.
I also have another unsorted byte array of »recent additions«.
It is anticipated that often it has to be determined whether a
certain block is contained in any of those two arrays.
I.e., both blocks together implement a »set of byte blocks«.
Eventually, the recent additions will be sorted and then both
arrays will be written out to a file. The file is to contain
the byte blocks of both arrays in a sorted order, so the next
byte block written is chosen from both arrays to be the
smallest left.
I assume that I could implement the file access via either
java.io or java.nio. So, what should I choose?
In the web I read, that »NIO will be particularly relevant for
developers of high-performance applications such as database
engines«. My pair of arrays might be considered to be a kind
of »database engine«. But still I do not know whether
java.nio will have any benefits in my case.