jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java
changeset 19607 bee007586d06
parent 16921 e70261f11307
child 22604 9b394795e216
equal deleted inserted replaced
19606:6c846d61ba2f 19607:bee007586d06
    35     extends Pipe.SinkChannel
    35     extends Pipe.SinkChannel
    36     implements SelChImpl
    36     implements SelChImpl
    37 {
    37 {
    38 
    38 
    39     // Used to make native read and write calls
    39     // Used to make native read and write calls
    40     private static NativeDispatcher nd;
    40     private static final NativeDispatcher nd = new FileDispatcherImpl();
    41 
    41 
    42     // The file descriptor associated with this channel
    42     // The file descriptor associated with this channel
    43     FileDescriptor fd;
    43     FileDescriptor fd;
    44 
    44 
    45     // fd value needed for dev/poll. This value will remain valid
    45     // fd value needed for dev/poll. This value will remain valid
   204     {
   204     {
   205         if ((offset < 0) || (length < 0) || (offset > srcs.length - length))
   205         if ((offset < 0) || (length < 0) || (offset > srcs.length - length))
   206            throw new IndexOutOfBoundsException();
   206            throw new IndexOutOfBoundsException();
   207         return write(Util.subsequence(srcs, offset, length));
   207         return write(Util.subsequence(srcs, offset, length));
   208     }
   208     }
   209 
       
   210     static {
       
   211         Util.load();
       
   212         nd = new FileDispatcherImpl();
       
   213     }
       
   214 
       
   215 }
   209 }