         return m.run(runtime_state)
       params = @take_params caller_stack
       runtime_state.meta_stack.push(new runtime.StackFrame(this,params,[]))
-      padding = (' ' for [2...runtime_state.meta_stack.length]).join('')
+    padding = (' ' for [2...runtime_state.meta_stack.length]).join('')
     sig = "#{@class_name}::#{@name}#{@raw_descriptor}"
     debug "#{padding}entering method #{sig}"
     # check for trapped and native methods, run those manually
-    if trapped_methods[sig]
+    cf = runtime_state.curr_frame()
+    if cf.resume? # we are resuming from a yield, and this was a manually run method
+      @run_manually cf.resume, runtime_state
+      cf.resume = null
+    else if trapped_methods[sig]
       @run_manually trapped_methods[sig], runtime_state
     else if @access_flags.native
       if sig.indexOf('::registerNatives()V',1) >= 0 or sig.indexOf('::initIDs()V',1) >= 0

        cf = runtime_state.curr_frame()
        runtime_state.resuming_stack--
        return cf.method.run(runtime_state) unless cf.method is @
    else
      caller_stack = runtime_state.curr_frame().stack
      if virtual

      ]
      FileInputStream: [
        o 'available()I', (rs) -> 1 # TODO
        o 'readBytes([BII)I', (rs, _this, byte_arr, offset, n_bytes) ->
            result = null # will be filled in after the yield
            rs.curr_frame().resume = -> result
            throw new util.YieldException (cb) ->
              rs.async_input n_bytes, (bytes) ->
                byte_arr.array[offset...offset+bytes.length] = bytes
                result = bytes.length
                cb()
      ]
      ObjectStreamClass: [
        o 'initNative()V', (rs) ->  # NOP
