8233451: (fs) Files.newInputStream() cannot be used with character special files

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2024-10-23 18:53:30 +00:00
parent 002de86081
commit de92fe3757
8 changed files with 415 additions and 31 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, 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
@ -93,6 +93,14 @@ class UnixFileDispatcherImpl extends FileDispatcher {
return size0(fd);
}
int available(FileDescriptor fd) throws IOException {
return available0(fd);
}
boolean isOther(FileDescriptor fd) throws IOException {
return isOther0(fd);
}
int lock(FileDescriptor fd, boolean blocking, long pos, long size,
boolean shared) throws IOException
{
@ -196,6 +204,10 @@ class UnixFileDispatcherImpl extends FileDispatcher {
static native long size0(FileDescriptor fd) throws IOException;
static native int available0(FileDescriptor fd) throws IOException;
static native boolean isOther0(FileDescriptor fd) throws IOException;
static native int lock0(FileDescriptor fd, boolean blocking, long pos,
long size, boolean shared) throws IOException;