src/java.base/unix/classes/sun/nio/ch/PipeImpl.java
changeset 49290 07779973cbe2
parent 47216 71c04702a3d5
equal deleted inserted replaced
49289:148e29df1644 49290:07779973cbe2
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    36 
    36 
    37     // Source and sink channels
    37     // Source and sink channels
    38     private final SourceChannel source;
    38     private final SourceChannel source;
    39     private final SinkChannel sink;
    39     private final SinkChannel sink;
    40 
    40 
    41     PipeImpl(SelectorProvider sp) {
    41     PipeImpl(SelectorProvider sp) throws IOException {
    42         long pipeFds = IOUtil.makePipe(true);
    42         long pipeFds = IOUtil.makePipe(true);
    43         int readFd = (int) (pipeFds >>> 32);
    43         int readFd = (int) (pipeFds >>> 32);
    44         int writeFd = (int) pipeFds;
    44         int writeFd = (int) pipeFds;
    45         FileDescriptor sourcefd = new FileDescriptor();
    45         FileDescriptor sourcefd = new FileDescriptor();
    46         IOUtil.setfdVal(sourcefd, readFd);
    46         IOUtil.setfdVal(sourcefd, readFd);