jnr.constants.platform.Errno.valueOf()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(108)

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

Errno.valueOf介绍

暂无

代码示例

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

static ChannelFD open_func(Ruby runtime, RubyIO.Sysopen data) {
  ChannelFD ret = parentRedirectOpen(runtime, data);
  data.errno = Errno.valueOf(runtime.getPosix().errno());
  return ret;
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

@Override
public FileStat fstat(int fd) {
  FileStat stat = allocateStat();
  int ret = fstat(fd, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd));
  return stat;
}

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

public RaiseException newErrnoFromInt(int errno) {
  Errno errnoObj = Errno.valueOf(errno);
  if (errnoObj == null) {
    return newSystemCallError("Unknown Error (" + errno + ")");
  }
  String message = errnoObj.description();
  return newErrnoFromInt(errno, message);
}

代码示例来源:origin: com.github.jnr/jnr-posix

@Override
public FileStat fstat(int fd) {
  FileStat stat = allocateStat();
  int ret = fstat(fd, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd));
  return stat;
}

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

public RaiseException newErrnoFromInt(int errno) {
  Errno errnoObj = Errno.valueOf(errno);
  if (errnoObj == null) {
    return newSystemCallError("Unknown Error (" + errno + ")");
  }
  String message = errnoObj.description();
  return newErrnoFromInt(errno, message);
}

代码示例来源:origin: com.github.jnr/jnr-posix

@Override
public FileStat fstat(FileDescriptor fileDescriptor) {
  FileStat stat = allocateStat();
  int fd = helper.getfd(fileDescriptor);
  int ret = fstat(fd, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd));
  return stat;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

@Override
public FileStat fstat(FileDescriptor fileDescriptor) {
  FileStat stat = allocateStat();
  int fd = helper.getfd(fileDescriptor);
  int ret = fstat(fd, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd));
  return stat;
}

代码示例来源:origin: com.github.jnr/jnr-posix

public int mkdir(String path, int mode) {
  int res = libc().mkdir(path, mode);
  if (res < 0) {
    int errno = errno();
    handler.error(Errno.valueOf(errno), "mkdir", path);
  }
  return res;
}

代码示例来源:origin: com.github.jnr/jnr-posix

public FileStat fstat(int fd) {
  WindowsFileStat stat = new WindowsFileStat(this);
  if (fstat(fd, stat) < 0) handler.error(Errno.valueOf(errno()), "fstat", "" + fd);
  return stat;
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

@Override
public FileStat lstat(String path) {
  FileStat stat = allocateStat();
  int ret = lstat(path, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "lstat", path);
  return stat;
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

public FileStat fstat(int fd) {
  WindowsFileStat stat = new WindowsFileStat(this);
  if (fstat(fd, stat) < 0) handler.error(Errno.valueOf(errno()), "fstat", "" + fd);
  return stat;
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

public int mkdir(String path, int mode) {
  int res = libc().mkdir(path, mode);
  if (res < 0) {
    int errno = errno();
    handler.error(Errno.valueOf(errno), "mkdir", path);
  }
  return res;
}

代码示例来源:origin: com.github.jnr/jnr-posix

@Override
public FileStat stat(String path) {
  FileStat stat = allocateStat();
  int ret = stat(path, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "stat", path);
  return stat;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

@Override
public FileStat lstat(String path) {
  FileStat stat = allocateStat();
  int ret = lstat(path, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "lstat", path);
  return stat;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

@Override
public FileStat stat(String path) {
  FileStat stat = allocateStat();
  int ret = stat(path, stat);
  if (ret < 0) handler.error(Errno.valueOf(errno()), "stat", path);
  return stat;
}

代码示例来源:origin: com.cloudbees.util/jnr-unixsocket-nodep

public int rmdir(String path) {
  int res = libc().rmdir(path);
  if (res < 0) handler.error(Errno.valueOf(errno()), "rmdir", path);
  return res;
}

代码示例来源:origin: com.github.jnr/jnr-posix

public FileStat fstat(int fd) {
  FileStat stat = allocateStat();
  if (fstat(fd, stat) < 0) handler.error(Errno.valueOf(errno()), "fstat", "" + fd);  
  return stat;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

public FileStat stat(String path) {
  FileStat stat = allocateStat();
  if (stat(path, stat) < 0) handler.error(Errno.valueOf(errno()), "stat", path);
  
  return stat;
}

代码示例来源:origin: com.github.jnr/jnr-posix

public FileStat fstat(FileDescriptor fileDescriptor) {
  FileStat stat = allocateStat();
  if (fstat(fileDescriptor, stat) < 0) handler.error(Errno.valueOf(errno()), "fstat", "" + helper.getfd(fileDescriptor));
  
  return stat;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

public FileStat fstat(FileDescriptor fileDescriptor) {
  FileStat stat = allocateStat();
  if (fstat(fileDescriptor, stat) < 0) handler.error(Errno.valueOf(errno()), "fstat", "" + helper.getfd(fileDescriptor));
  
  return stat;
}

相关文章