Code example for IOError

            } catch (IOException e) {
                if(e.getCause()!=null && e.getCause() instanceof OutOfMemoryError){
                    throw new RuntimeException("File could not be mapped to memory, common problem on 32bit JVM. Use `DBMaker.newRandomAccessFileDB()` as workaround",e);
                throw new IOError(e);
    public static final class MemoryVol extends ByteBufferVol { 
        protected final boolean useDirectBuffer;
        public String toString() {
            return super.toString()+",direct="+useDirectBuffer;
        public MemoryVol(boolean useDirectBuffer) {
Experience pair programming with AI  Get Codota for Java