mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8233451: (fs) Files.newInputStream() cannot be used with character special files
Reviewed-by: alanb
This commit is contained in:
parent
002de86081
commit
de92fe3757
8 changed files with 415 additions and 31 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue