org.jruby.Ruby.getIn()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.jruby.Ruby.getIn方法的一些代码示例,展示了Ruby.getIn的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getIn方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getIn

Ruby.getIn介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

@Deprecated
public RubyIO(Ruby runtime, STDIO stdio) {
  super(runtime, runtime.getIO());
  RubyIO tmp = null;
  switch (stdio) {
    case IN:
      tmp = prepStdio(runtime, runtime.getIn(), Channels.newChannel(runtime.getIn()), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
      break;
    case OUT:
      tmp = prepStdio(runtime, runtime.getOut(), Channels.newChannel(runtime.getOut()), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");
      break;
    case ERR:
      tmp = prepStdio(runtime, runtime.getErr(), Channels.newChannel(runtime.getErr()), OpenFile.WRITABLE | OpenFile.SYNC, runtime.getIO(), "<STDERR>");
      break;
  }
  this.openFile = tmp.openFile;
  tmp.openFile = null;
}

代码示例来源:origin: org.jruby/jruby-core

runtime, runtime.getIn(), new NativeDeviceChannel(0), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
  stdout = RubyIO.prepStdio(
      runtime, runtime.getOut(), new NativeDeviceChannel(1), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");
} else {
  stdin = RubyIO.prepStdio(
      runtime, runtime.getIn(), prepareStdioChannel(runtime, STDIO.IN, runtime.getIn()), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
  stdout = RubyIO.prepStdio(
      runtime, runtime.getOut(), prepareStdioChannel(runtime, STDIO.OUT, runtime.getOut()), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");

代码示例来源:origin: org.jruby/jruby-complete

runtime, runtime.getIn(), new NativeDeviceChannel(0), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
  stdout = RubyIO.prepStdio(
      runtime, runtime.getOut(), new NativeDeviceChannel(1), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");
} else {
  stdin = RubyIO.prepStdio(
      runtime, runtime.getIn(), prepareStdioChannel(runtime, STDIO.IN, runtime.getIn()), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
  stdout = RubyIO.prepStdio(
      runtime, runtime.getOut(), prepareStdioChannel(runtime, STDIO.OUT, runtime.getOut()), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");

代码示例来源:origin: org.jruby/jruby-core

@Deprecated
public RubyIO(Ruby runtime, STDIO stdio) {
  super(runtime, runtime.getIO());
  RubyIO tmp = null;
  switch (stdio) {
    case IN:
      tmp = prepStdio(runtime, runtime.getIn(), Channels.newChannel(runtime.getIn()), OpenFile.READABLE, runtime.getIO(), "<STDIN>");
      break;
    case OUT:
      tmp = prepStdio(runtime, runtime.getOut(), Channels.newChannel(runtime.getOut()), OpenFile.WRITABLE, runtime.getIO(), "<STDOUT>");
      break;
    case ERR:
      tmp = prepStdio(runtime, runtime.getErr(), Channels.newChannel(runtime.getErr()), OpenFile.WRITABLE | OpenFile.SYNC, runtime.getIO(), "<STDERR>");
      break;
  }
  this.openFile = tmp.openFile;
  tmp.openFile = null;
}

代码示例来源:origin: org.jruby/jruby-complete

fd = new ChannelFD(Channels.newChannel(runtime.getIn()), runtime.getPosix(), runtime.getFilenoUtil());
  break;
case 1:

代码示例来源:origin: org.jruby/jruby-core

fd = new ChannelFD(Channels.newChannel(runtime.getIn()), runtime.getPosix(), runtime.getFilenoUtil());
  break;
case 1:

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

case IN:
  descriptor = new ChannelDescriptor(runtime.getIn(), newModeFlags(runtime, ModeFlags.RDONLY), FileDescriptor.in);
  runtime.putFilenoMap(0, descriptor.getFileno());
  mainStream = ChannelStream.open(runtime, descriptor);

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

case IN:
  descriptor = new ChannelDescriptor(runtime.getIn(), newModeFlags(runtime, ModeFlags.RDONLY), FileDescriptor.in);
  runtime.putFilenoMap(0, descriptor.getFileno());
  mainStream = ChannelStream.open(runtime, descriptor);

相关文章

Ruby类方法