public class org.jruby.util.io.BlockingIO
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.jruby.util.io.BlockingIO
  super_class: java.lang.Object
{
  private static final java.util.Map<java.nio.channels.spi.SelectorProvider, org.jruby.util.io.BlockingIO$IOSelector> selectors;
    descriptor: Ljava/util/Map;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    Signature: Ljava/util/Map<Ljava/nio/channels/spi/SelectorProvider;Lorg/jruby/util/io/BlockingIO$IOSelector;>;

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 180
            new java.util.concurrent.ConcurrentHashMap
            dup
            invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
         1: .line 179
            putstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
         2: .line 180
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  public void <init>();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.jruby.util.io.BlockingIO this
         0: .line 54
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // org.jruby.util.io.BlockingIO this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/jruby/util/io/BlockingIO;

  private static org.jruby.util.io.BlockingIO$IOSelector getSelector(java.nio.channels.spi.SelectorProvider);
    descriptor: (Ljava/nio/channels/spi/SelectorProvider;)Lorg/jruby/util/io/BlockingIO$IOSelector;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=3, locals=4, args_size=1
        start local 0 // java.nio.channels.spi.SelectorProvider provider
         0: .line 183
            getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
            aload 0 /* provider */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.jruby.util.io.BlockingIO$IOSelector
            astore 1 /* sel */
        start local 1 // org.jruby.util.io.BlockingIO$IOSelector sel
         1: .line 184
            aload 1 /* sel */
            ifnull 3
         2: .line 185
            aload 1 /* sel */
            areturn
         3: .line 191
      StackMap locals: org.jruby.util.io.BlockingIO$IOSelector
      StackMap stack:
            aload 0 /* provider */
            dup
            astore 2
            monitorenter
         4: .line 192
            getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
            aload 0 /* provider */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.jruby.util.io.BlockingIO$IOSelector
            astore 1 /* sel */
         5: .line 193
            aload 1 /* sel */
            ifnonnull 11
         6: .line 194
            new org.jruby.util.io.BlockingIO$IOSelector
            dup
            aload 0 /* provider */
            invokespecial org.jruby.util.io.BlockingIO$IOSelector.<init>:(Ljava/nio/channels/spi/SelectorProvider;)V
            astore 1 /* sel */
         7: .line 195
            getstatic org.jruby.util.io.BlockingIO.selectors:Ljava/util/Map;
            aload 0 /* provider */
            aload 1 /* sel */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         8: .line 196
            new java.lang.Thread
            dup
            aload 1 /* sel */
            invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
            astore 3 /* t */
        start local 3 // java.lang.Thread t
         9: .line 197
            aload 3 /* t */
            iconst_1
            invokevirtual java.lang.Thread.setDaemon:(Z)V
        10: .line 198
            aload 3 /* t */
            invokevirtual java.lang.Thread.start:()V
        end local 3 // java.lang.Thread t
        11: .line 191
      StackMap locals: java.nio.channels.spi.SelectorProvider
      StackMap stack:
            aload 2
            monitorexit
        12: goto 15
      StackMap locals:
      StackMap stack: java.lang.Throwable
        13: aload 2
            monitorexit
        14: athrow
        15: .line 201
      StackMap locals:
      StackMap stack:
            aload 1 /* sel */
            areturn
        end local 1 // org.jruby.util.io.BlockingIO$IOSelector sel
        end local 0 // java.nio.channels.spi.SelectorProvider provider
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   16     0  provider  Ljava/nio/channels/spi/SelectorProvider;
            1   16     1       sel  Lorg/jruby/util/io/BlockingIO$IOSelector;
            9   11     3         t  Ljava/lang/Thread;
      Exception table:
        from    to  target  type
           4    12      13  any
          13    14      13  any
    Exceptions:
      throws java.io.IOException
    MethodParameters:
          Name  Flags
      provider  

  private static org.jruby.util.io.BlockingIO$IOSelector getSelector(java.nio.channels.Channel);
    descriptor: (Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=3, locals=1, args_size=1
        start local 0 // java.nio.channels.Channel channel
         0: .line 204
            aload 0 /* channel */
            instanceof java.nio.channels.SelectableChannel
            ifne 2
         1: .line 205
            new java.lang.IllegalArgumentException
            dup
            ldc "channel must be a SelectableChannel"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 207
      StackMap locals:
      StackMap stack:
            aload 0 /* channel */
            checkcast java.nio.channels.SelectableChannel
            invokevirtual java.nio.channels.SelectableChannel.provider:()Ljava/nio/channels/spi/SelectorProvider;
            invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/spi/SelectorProvider;)Lorg/jruby/util/io/BlockingIO$IOSelector;
            areturn
        end local 0 // java.nio.channels.Channel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    3     0  channel  Ljava/nio/channels/Channel;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      channel  

  public static final org.jruby.util.io.BlockingIO$Condition newCondition(java.nio.channels.Channel, int, java.lang.Object);
    descriptor: (Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
    Code:
      stack=4, locals=3, args_size=3
        start local 0 // java.nio.channels.Channel channel
        start local 1 // int ops
        start local 2 // java.lang.Object monitor
         0: .line 210
            aload 0 /* channel */
            invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
            aload 0 /* channel */
            iload 1 /* ops */
            aload 2 /* monitor */
            invokevirtual org.jruby.util.io.BlockingIO$IOSelector.add:(Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
            areturn
        end local 2 // java.lang.Object monitor
        end local 1 // int ops
        end local 0 // java.nio.channels.Channel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    1     0  channel  Ljava/nio/channels/Channel;
            0    1     1      ops  I
            0    1     2  monitor  Ljava/lang/Object;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      channel  
      ops      
      monitor  

  public static final org.jruby.util.io.BlockingIO$Condition newCondition(java.nio.channels.Channel, int);
    descriptor: (Ljava/nio/channels/Channel;I)Lorg/jruby/util/io/BlockingIO$Condition;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // java.nio.channels.Channel channel
        start local 1 // int ops
         0: .line 213
            aload 0 /* channel */
            iload 1 /* ops */
            new java.lang.Object
            dup
            invokespecial java.lang.Object.<init>:()V
            invokestatic org.jruby.util.io.BlockingIO.newCondition:(Ljava/nio/channels/Channel;ILjava/lang/Object;)Lorg/jruby/util/io/BlockingIO$Condition;
            areturn
        end local 1 // int ops
        end local 0 // java.nio.channels.Channel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    1     0  channel  Ljava/nio/channels/Channel;
            0    1     1      ops  I
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      channel  
      ops      

  public static void waitForIO(java.nio.channels.Channel, int);
    descriptor: (Ljava/nio/channels/Channel;I)V
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // java.nio.channels.Channel channel
        start local 1 // int op
         0: .line 216
            aload 0 /* channel */
            invokestatic org.jruby.util.io.BlockingIO.getSelector:(Ljava/nio/channels/Channel;)Lorg/jruby/util/io/BlockingIO$IOSelector;
            aload 0 /* channel */
            iload 1 /* op */
            invokevirtual org.jruby.util.io.BlockingIO$IOSelector.await:(Ljava/nio/channels/Channel;I)V
         1: .line 217
            return
        end local 1 // int op
        end local 0 // java.nio.channels.Channel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    2     0  channel  Ljava/nio/channels/Channel;
            0    2     1       op  I
    Exceptions:
      throws java.lang.InterruptedException, java.io.IOException
    MethodParameters:
         Name  Flags
      channel  
      op       

  public static void awaitReadable(java.nio.channels.ReadableByteChannel);
    descriptor: (Ljava/nio/channels/ReadableByteChannel;)V
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.nio.channels.ReadableByteChannel channel
         0: .line 219
            aload 0 /* channel */
            iconst_1
            invokestatic org.jruby.util.io.BlockingIO.waitForIO:(Ljava/nio/channels/Channel;I)V
         1: .line 220
            return
        end local 0 // java.nio.channels.ReadableByteChannel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    2     0  channel  Ljava/nio/channels/ReadableByteChannel;
    Exceptions:
      throws java.lang.InterruptedException, java.io.IOException
    MethodParameters:
         Name  Flags
      channel  

  public static void awaitWritable(java.nio.channels.WritableByteChannel);
    descriptor: (Ljava/nio/channels/WritableByteChannel;)V
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.nio.channels.WritableByteChannel channel
         0: .line 222
            aload 0 /* channel */
            iconst_4
            invokestatic org.jruby.util.io.BlockingIO.waitForIO:(Ljava/nio/channels/Channel;I)V
         1: .line 223
            return
        end local 0 // java.nio.channels.WritableByteChannel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    2     0  channel  Ljava/nio/channels/WritableByteChannel;
    Exceptions:
      throws java.lang.InterruptedException, java.io.IOException
    MethodParameters:
         Name  Flags
      channel  

  public static int read(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer, boolean);
    descriptor: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;Z)I
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // java.nio.channels.ReadableByteChannel channel
        start local 1 // java.nio.ByteBuffer buf
        start local 2 // boolean blocking
         0: .line 226
      StackMap locals:
      StackMap stack:
            aload 0 /* channel */
            aload 1 /* buf */
            invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
            istore 3 /* n */
        start local 3 // int n
         1: .line 227
            iload 3 /* n */
            ifne 2
            iload 2 /* blocking */
            ifeq 2
            aload 0 /* channel */
            instanceof java.nio.channels.SelectableChannel
            ifeq 2
            aload 1 /* buf */
            invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
            ifne 3
         2: .line 228
      StackMap locals: int
      StackMap stack:
            iload 3 /* n */
            ireturn
         3: .line 231
      StackMap locals:
      StackMap stack:
            aload 0 /* channel */
            invokestatic org.jruby.util.io.BlockingIO.awaitReadable:(Ljava/nio/channels/ReadableByteChannel;)V
         4: .line 232
            goto 0
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
         5: astore 4 /* ex */
        start local 4 // java.lang.InterruptedException ex
         6: .line 233
            new java.io.InterruptedIOException
            dup
            aload 4 /* ex */
            invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
            invokespecial java.io.InterruptedIOException.<init>:(Ljava/lang/String;)V
            athrow
        end local 4 // java.lang.InterruptedException ex
        end local 3 // int n
        end local 2 // boolean blocking
        end local 1 // java.nio.ByteBuffer buf
        end local 0 // java.nio.channels.ReadableByteChannel channel
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0    7     0   channel  Ljava/nio/channels/ReadableByteChannel;
            0    7     1       buf  Ljava/nio/ByteBuffer;
            0    7     2  blocking  Z
            1    7     3         n  I
            6    7     4        ex  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
           3     4       5  Class java.lang.InterruptedException
    Exceptions:
      throws java.io.IOException
    MethodParameters:
          Name  Flags
      channel   
      buf       
      blocking  

  public static int write(java.nio.channels.WritableByteChannel, java.nio.ByteBuffer, boolean);
    descriptor: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;Z)I
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=5, args_size=3
        start local 0 // java.nio.channels.WritableByteChannel channel
        start local 1 // java.nio.ByteBuffer buf
        start local 2 // boolean blocking
         0: .line 239
      StackMap locals:
      StackMap stack:
            aload 0 /* channel */
            aload 1 /* buf */
            invokeinterface java.nio.channels.WritableByteChannel.write:(Ljava/nio/ByteBuffer;)I
            istore 3 /* n */
        start local 3 // int n
         1: .line 240
            iload 3 /* n */
            ifne 2
            iload 2 /* blocking */
            ifeq 2
            aload 0 /* channel */
            instanceof java.nio.channels.SelectableChannel
            ifeq 2
            aload 1 /* buf */
            invokevirtual java.nio.ByteBuffer.hasRemaining:()Z
            ifne 3
         2: .line 241
      StackMap locals: int
      StackMap stack:
            iload 3 /* n */
            ireturn
         3: .line 244
      StackMap locals:
      StackMap stack:
            aload 0 /* channel */
            invokestatic org.jruby.util.io.BlockingIO.awaitWritable:(Ljava/nio/channels/WritableByteChannel;)V
         4: .line 245
            goto 0
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
         5: astore 4 /* ex */
        start local 4 // java.lang.InterruptedException ex
         6: .line 246
            new java.io.InterruptedIOException
            dup
            aload 4 /* ex */
            invokevirtual java.lang.InterruptedException.getMessage:()Ljava/lang/String;
            invokespecial java.io.InterruptedIOException.<init>:(Ljava/lang/String;)V
            athrow
        end local 4 // java.lang.InterruptedException ex
        end local 3 // int n
        end local 2 // boolean blocking
        end local 1 // java.nio.ByteBuffer buf
        end local 0 // java.nio.channels.WritableByteChannel channel
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0    7     0   channel  Ljava/nio/channels/WritableByteChannel;
            0    7     1       buf  Ljava/nio/ByteBuffer;
            0    7     2  blocking  Z
            1    7     3         n  I
            6    7     4        ex  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
           3     4       5  Class java.lang.InterruptedException
    Exceptions:
      throws java.io.IOException
    MethodParameters:
          Name  Flags
      channel   
      buf       
      blocking  

  public static int blockingRead(java.nio.channels.ReadableByteChannel, java.nio.ByteBuffer);
    descriptor: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;)I
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // java.nio.channels.ReadableByteChannel channel
        start local 1 // java.nio.ByteBuffer buf
         0: .line 251
            aload 0 /* channel */
            aload 1 /* buf */
            iconst_1
            invokestatic org.jruby.util.io.BlockingIO.read:(Ljava/nio/channels/ReadableByteChannel;Ljava/nio/ByteBuffer;Z)I
            ireturn
        end local 1 // java.nio.ByteBuffer buf
        end local 0 // java.nio.channels.ReadableByteChannel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    1     0  channel  Ljava/nio/channels/ReadableByteChannel;
            0    1     1      buf  Ljava/nio/ByteBuffer;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      channel  
      buf      

  public static int blockingWrite(java.nio.channels.WritableByteChannel, java.nio.ByteBuffer);
    descriptor: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;)I
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=2, args_size=2
        start local 0 // java.nio.channels.WritableByteChannel channel
        start local 1 // java.nio.ByteBuffer buf
         0: .line 254
            aload 0 /* channel */
            aload 1 /* buf */
            iconst_1
            invokestatic org.jruby.util.io.BlockingIO.write:(Ljava/nio/channels/WritableByteChannel;Ljava/nio/ByteBuffer;Z)I
            ireturn
        end local 1 // java.nio.ByteBuffer buf
        end local 0 // java.nio.channels.WritableByteChannel channel
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    1     0  channel  Ljava/nio/channels/WritableByteChannel;
            0    1     1      buf  Ljava/nio/ByteBuffer;
    Exceptions:
      throws java.io.IOException
    MethodParameters:
         Name  Flags
      channel  
      buf      
}
SourceFile: "BlockingIO.java"
NestMembers:
  org.jruby.util.io.BlockingIO$Condition  org.jruby.util.io.BlockingIO$IOChannel  org.jruby.util.io.BlockingIO$IOSelector
InnerClasses:
  public final Condition = org.jruby.util.io.BlockingIO$Condition of org.jruby.util.io.BlockingIO
  final IOChannel = org.jruby.util.io.BlockingIO$IOChannel of org.jruby.util.io.BlockingIO
  final IOSelector = org.jruby.util.io.BlockingIO$IOSelector of org.jruby.util.io.BlockingIO