--- old/src/java.base/windows/native/libjava/io_util_md.c 2015-12-17 13:14:15.161212631 +0530 +++ new/src/java.base/windows/native/libjava/io_util_md.c 2015-12-17 13:14:14.905212627 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, 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 @@ -584,3 +584,14 @@ } return long_to_jlong(pos.QuadPart); } + +jlong +handleGetLength(FD fd) { + HANDLE h = (HANDLE) fd; + LARGE_INTEGER length; + if (GetFileSizeEx(h, &length) != 0) { + return long_to_jlong(length.QuadPart); + } else { + return -1; + } +}