I want to stream large amounts of data from the hardrive, i’m using the following code
FileInputStream file_input = new FileInputStream(DTConstants.OCTREE_TEMP_LOCATION+fileName);
FileChannel file_input_chan = file_input.getChannel();
MappedByteBuffer mappedBuffer = file_input_chan.map(FileChannel.MapMode.READ_ONLY, 0, file_input_chan.size());
But after a short amount of time i get this exception
“Not enough storage is available to process this command”
i can circumvent this by setting this:
mappedBuffer = null;
file_input_chan = null;
file_input = null;
System.gc();
But calling the garbage collector is really time expensive, so is there another way of doing this
tia
Paul