Class Unistd.JnhwPrimitiveArrayCritical

  • Enclosing class:
    Unistd

    public abstract static class Unistd.JnhwPrimitiveArrayCritical
    extends Object
    • Constructor Detail

      • JnhwPrimitiveArrayCritical

        public JnhwPrimitiveArrayCritical()
    • Method Detail

      • write

        public static final int write​(int fildes,
                                      byte[] buf)
                               throws NativeErrorException
        Parameters:
        fildes - a valid file descriptor open for writing
        buf - The byte array from which all bytes are to be retrieved for writing.
        Returns:
        The number of bytes written, possibly zero.
        Throws:
        NativeErrorException - if the return value of the native function indicates an error.
      • read

        public static final int read​(int fildes,
                                     byte[] buf)
                              throws NativeErrorException
        Parameters:
        fildes - a valid file descriptor open for reading
        buf - the byte array into which all bytes are to be transferred.
        Returns:
        The number of bytes read, possibly zero.
        Throws:
        NativeErrorException - if the return value of the native function indicates an error.
      • read

        public static final int read​(int fildes,
                                     byte[] buf,
                                     int off,
                                     int nbyte)
                              throws NativeErrorException
        Parameters:
        fildes - a valid file descriptor open for reading
        buf - the byte array into which bytes are to be transferred.
        off - the start offset in buf to which the data is transferred.
        nbyte - the maximum number of bytes to read.
        Returns:
        The number of bytes read, possibly zero.
        Throws:
        NullPointerException - if buf is null.
        ArrayIndexOutOfBoundsException - if off or nByte out of bounds.
        NativeErrorException - if the return value of the native function indicates an error.
      • write

        public static final int write​(int fildes,
                                      byte[] buf,
                                      int off,
                                      int nbyte)
                               throws NativeErrorException
        Parameters:
        fildes - a valid file descriptor open for writing
        buf - The byte array from which the bytes are to be retrieved for writing.
        off - the start offset in buf.
        nbyte - the number of bytes to write.
        Returns:
        The number of bytes written, possibly zero.
        Throws:
        NullPointerException - if buf is null.
        ArrayIndexOutOfBoundsException - if off or nByte out of bounds.
        NativeErrorException - if the return value of the native function indicates an error.