--- old/src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java 2017-08-09 14:53:23.338811146 -0700 +++ new/src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java 2017-08-09 14:53:23.231811145 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,6 +116,18 @@ return false; } + int setDirectIO(FileDescriptor fd, String path) + { + int result = -1; + try { + result = setDirect0(fd); + } catch (IOException e) { + throw new UnsupportedOperationException + ("Error setting up DirectIO", e); + } + return result; + } + // -- Native methods -- static native int read0(FileDescriptor fd, long address, int len) @@ -159,6 +171,8 @@ static native void closeIntFD(int fd) throws IOException; + static native int setDirect0(FileDescriptor fd) throws IOException; + static native void init(); }