MappedByteBufferHandler function ( File arg0 ) { MappedByteBuffer loc0 = Files . map ( arg0 ) ; return new MappedByteBufferHandler ( loc0 ) ; }
fully maps a file read-only in to memory as per filechannel #map java.nio.channels.filechannel.mapmode , long , long . files are mapped from offset 0 to its length . this only works for files similar to files #map file , but returns mappedbytebufferhandler , that makes it easier to unmap the buffer within try-with-resources pattern : try mappedbytebufferhandler filemappinghandler = fileutils.map file bytebuffer filemapping = filemappinghandler.get ; / / use mapped buffer concode_field_sep long size concode_elem_sep Predicate<Throwable> IS_EXCEPTION concode_elem_sep Collection<File> files concode_field_sep void addSizedFiles concode_elem_sep long size concode_elem_sep boolean apply concode_elem_sep void addFiles concode_elem_sep FileCopyResult retryCopy concode_elem_sep Collection<File> getFiles concode_elem_sep void addFile