On Mon, 14 Oct 2024 23:30:06 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> Add `isOther` and `available` methods to `FileChannelImpl` and the interfaces > to native code and use these in `ChannelInputStream` to work around cases > where a wrapped `FileChannelImpl` is not really seekable. src/java.base/windows/native/libjava/io_util_md.h line 44: > 42: WCHAR* currentDir(int di); > 43: int currentDirLength(const WCHAR* path, int pathlen); > 44: JNIEXPORT int handleAvailable(FD fd, jlong *pbytes); This should not be exported. src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c line 402: > 400: HANDLE handle = (HANDLE)(handleval(env, fdo)); > 401: jlong available; > 402: if (handleAvailable((jlong)handle, &available)) { Ugh, we shouldn't be using handleAvailable here. This native method needs to stand on its own. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21508#discussion_r1800469509 PR Review Comment: https://git.openjdk.org/jdk/pull/21508#discussion_r1800469147