예제 #1
0
 /// <exception cref="System.IO.IOException"/>
 private static void ReadChannelFully(ReadableByteChannel ch, ByteBuffer buf)
 {
     while (buf.Remaining() > 0)
     {
         int n = ch.Read(buf);
         if (n < 0)
         {
             throw new IOException("Premature EOF reading from " + ch);
         }
     }
 }
예제 #2
0
 /// <exception cref="System.IO.IOException"/>
 internal override int PerformIO(ByteBuffer buf)
 {
     return(channel.Read(buf));
 }