Package jnr.posix

Class JavaLibCHelper

java.lang.Object
jnr.posix.JavaLibCHelper

public class JavaLibCHelper extends Object
This libc implementation is created one per runtime instance versus the others which are expected to be one static instance for whole JVM. Because of this it is no big deal to make reference to a POSIXHandler directly.
  • Field Details

  • Constructor Details

    • JavaLibCHelper

      public JavaLibCHelper(POSIXHandler handler)
  • Method Details

    • getDescriptorFromChannel

      public static FileDescriptor getDescriptorFromChannel(Channel channel)
    • chmod

      public int chmod(String filename, int mode)
    • chown

      public int chown(String filename, int user, int group)
    • crypt

      public static CharSequence crypt(CharSequence original, CharSequence salt)
    • crypt

      public static byte[] crypt(byte[] original, byte[] salt)
    • getfd

      public int getfd(FileDescriptor descriptor)
    • getfdFromDescriptor

      public static int getfdFromDescriptor(FileDescriptor descriptor)
    • gethandle

      public static HANDLE gethandle(FileDescriptor descriptor)
    • gethandle

      public static HANDLE gethandle(long descriptor)
    • getlogin

      public String getlogin()
    • gethostname

      public String gethostname()
    • getpid

      public int getpid()
    • getpwent

      public Passwd getpwent()
    • setpwent

      public int setpwent()
    • endpwent

      public int endpwent()
    • getpwuid

      public Passwd getpwuid(int which)
    • isatty

      public int isatty(int fd)
    • link

      public int link(String oldpath, String newpath)
    • lstat

      public int lstat(String path, FileStat stat)
    • mkdir

      public int mkdir(String path, int mode)
    • rmdir

      public int rmdir(String path)
    • chdir

      public static int chdir(String path)
    • stat

      public int stat(String path, FileStat stat)
    • symlink

      public int symlink(String oldpath, String newpath)
    • readlink

      public int readlink(String oldpath, ByteBuffer buffer, int length) throws IOException
      Throws:
      IOException
    • getEnv

      public Map<String,String> getEnv()
    • toFileDescriptor

      public static FileDescriptor toFileDescriptor(int fileDescriptor)
    • toFileDescriptor

      public static FileDescriptor toFileDescriptor(HANDLE fileDescriptor)