jdk/src/share/classes/java/nio/channels/Pipe.java
changeset 18574 4aeaeb541678
parent 18164 68f1bc4eadd4
child 23010 6dadb192ad81
equal deleted inserted replaced
18573:52f07c119829 18574:4aeaeb541678
    31 
    31 
    32 /**
    32 /**
    33  * A pair of channels that implements a unidirectional pipe.
    33  * A pair of channels that implements a unidirectional pipe.
    34  *
    34  *
    35  * <p> A pipe consists of a pair of channels: A writable {@link
    35  * <p> A pipe consists of a pair of channels: A writable {@link
    36  * Pipe.SinkChannel </code>sink<code>} channel and a readable {@link
    36  * Pipe.SinkChannel sink} channel and a readable {@link Pipe.SourceChannel source}
    37  * Pipe.SourceChannel </code>source<code>} channel.  Once some bytes are
    37  * channel.  Once some bytes are written to the sink channel they can be read
    38  * written to the sink channel they can be read from source channel in exactly
    38  * from source channel in exactlyAthe order in which they were written.
    39  * the order in which they were written.
       
    40  *
    39  *
    41  * <p> Whether or not a thread writing bytes to a pipe will block until another
    40  * <p> Whether or not a thread writing bytes to a pipe will block until another
    42  * thread reads those bytes, or some previously-written bytes, from the pipe is
    41  * thread reads those bytes, or some previously-written bytes, from the pipe is
    43  * system-dependent and therefore unspecified.  Many pipe implementations will
    42  * system-dependent and therefore unspecified.  Many pipe implementations will
    44  * buffer up to a certain number of bytes between the sink and source channels,
    43  * buffer up to a certain number of bytes between the sink and source channels,
    61         extends AbstractSelectableChannel
    60         extends AbstractSelectableChannel
    62         implements ReadableByteChannel, ScatteringByteChannel
    61         implements ReadableByteChannel, ScatteringByteChannel
    63     {
    62     {
    64         /**
    63         /**
    65          * Constructs a new instance of this class.
    64          * Constructs a new instance of this class.
       
    65          *
       
    66          * @param  provider
       
    67          *         The selector provider
    66          */
    68          */
    67         protected SourceChannel(SelectorProvider provider) {
    69         protected SourceChannel(SelectorProvider provider) {
    68             super(provider);
    70             super(provider);
    69         }
    71         }
    70 
    72 
    92         extends AbstractSelectableChannel
    94         extends AbstractSelectableChannel
    93         implements WritableByteChannel, GatheringByteChannel
    95         implements WritableByteChannel, GatheringByteChannel
    94     {
    96     {
    95         /**
    97         /**
    96          * Initializes a new instance of this class.
    98          * Initializes a new instance of this class.
       
    99          *
       
   100          * @param  provider
       
   101          *         The selector provider
    97          */
   102          */
    98         protected SinkChannel(SelectorProvider provider) {
   103         protected SinkChannel(SelectorProvider provider) {
    99             super(provider);
   104             super(provider);
   100         }
   105         }
   101 
   106