< prev index next >

src/java.base/share/classes/sun/nio/ch/Util.java

Print this page

        

*** 413,423 **** Class<?> cl = Class.forName("java.nio.DirectByteBuffer"); Constructor<?> ctor = cl.getDeclaredConstructor( new Class<?>[] { int.class, long.class, FileDescriptor.class, ! Runnable.class }); ctor.setAccessible(true); directByteBufferConstructor = ctor; } catch (ClassNotFoundException | NoSuchMethodException | IllegalArgumentException | --- 413,424 ---- Class<?> cl = Class.forName("java.nio.DirectByteBuffer"); Constructor<?> ctor = cl.getDeclaredConstructor( new Class<?>[] { int.class, long.class, FileDescriptor.class, ! Runnable.class, ! boolean.class }); ctor.setAccessible(true); directByteBufferConstructor = ctor; } catch (ClassNotFoundException | NoSuchMethodException | IllegalArgumentException |
*** 428,448 **** }}); } static MappedByteBuffer newMappedByteBuffer(int size, long addr, FileDescriptor fd, ! Runnable unmapper) { MappedByteBuffer dbb; if (directByteBufferConstructor == null) initDBBConstructor(); try { dbb = (MappedByteBuffer)directByteBufferConstructor.newInstance( new Object[] { size, addr, fd, ! unmapper }); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new InternalError(e); } --- 429,451 ---- }}); } static MappedByteBuffer newMappedByteBuffer(int size, long addr, FileDescriptor fd, ! Runnable unmapper, ! boolean isPersistent) { MappedByteBuffer dbb; if (directByteBufferConstructor == null) initDBBConstructor(); try { dbb = (MappedByteBuffer)directByteBufferConstructor.newInstance( new Object[] { size, addr, fd, ! unmapper, ! isPersistent}); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new InternalError(e); }
*** 458,468 **** Class<?> cl = Class.forName("java.nio.DirectByteBufferR"); Constructor<?> ctor = cl.getDeclaredConstructor( new Class<?>[] { int.class, long.class, FileDescriptor.class, ! Runnable.class }); ctor.setAccessible(true); directByteBufferRConstructor = ctor; } catch (ClassNotFoundException | NoSuchMethodException | IllegalArgumentException | --- 461,472 ---- Class<?> cl = Class.forName("java.nio.DirectByteBufferR"); Constructor<?> ctor = cl.getDeclaredConstructor( new Class<?>[] { int.class, long.class, FileDescriptor.class, ! Runnable.class, ! boolean.class }); ctor.setAccessible(true); directByteBufferRConstructor = ctor; } catch (ClassNotFoundException | NoSuchMethodException | IllegalArgumentException |
*** 473,493 **** }}); } static MappedByteBuffer newMappedByteBufferR(int size, long addr, FileDescriptor fd, ! Runnable unmapper) { MappedByteBuffer dbb; if (directByteBufferRConstructor == null) initDBBRConstructor(); try { dbb = (MappedByteBuffer)directByteBufferRConstructor.newInstance( new Object[] { size, addr, fd, ! unmapper }); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new InternalError(e); } --- 477,499 ---- }}); } static MappedByteBuffer newMappedByteBufferR(int size, long addr, FileDescriptor fd, ! Runnable unmapper, ! boolean isPersistent) { MappedByteBuffer dbb; if (directByteBufferRConstructor == null) initDBBRConstructor(); try { dbb = (MappedByteBuffer)directByteBufferRConstructor.newInstance( new Object[] { size, addr, fd, ! unmapper, ! isPersistent}); } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) { throw new InternalError(e); }
< prev index next >