< prev index next >

src/windows/classes/sun/nio/ch/FileDispatcherImpl.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -91,10 +91,15 @@
 
     int truncate(FileDescriptor fd, long size) throws IOException {
         return truncate0(fd, size);
     }
 
+    int allocate(FileDescriptor fd, long size) throws IOException {
+        // truncate0() works for extending and truncating file size
+        return truncate0(fd, size);
+    }
+
     long size(FileDescriptor fd) throws IOException {
         return size0(fd);
     }
 
     int lock(FileDescriptor fd, boolean blocking, long pos, long size,
< prev index next >