Code example for IOError

0
            } 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;
 
        @Override 
        public String toString() {
            return super.toString()+",direct="+useDirectBuffer;
        } 
 
        public MemoryVol(boolean useDirectBuffer) {
            super(false); 
            this.useDirectBuffer = useDirectBuffer;