Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.platform.posix.natives
Interface LibC

All Superinterfaces:
  Library

All Known Implementing Classes:
  LibCImpl, LibCImpl, LibCImpl, LibCImpl, LibCImpl

    public interface LibC

extends Library

Import common functions variables and constants from libc.

Nested Class Summary
`static class` | `LibC.stat` C struct stat // struct stat { // dev_t st_dev; /* [XSI] ID of device containing file 4 0 // ino_t st_ino; /* [XSI] File serial number 4 4 // mode_t st_mode; /* [XSI] Mode of file (see below) 2 8 // nlink_t st_nlink; /* [XSI] Number of hard links 2 10 // uid_t st_uid; /* [XSI] User ID of the file 4 12 // gid_t st_gid; /* [XSI] Group ID of the file 4 16 // dev_t st_rdev; /* [XSI] Device ID 4 20 // time_t st_atime; /* [XSI] Time of last access 4 24 // long st_atimensec; /* nsec of last access 4 28 // time_t st_mtime; /* [XSI] Last data modification time 4 32 // long st_mtimensec; /* last data modification nsec 4 36 // time_t st_ctime; /* [XSI] Time of last status change 4 40 // long st_ctimensec; /* nsec of last status change 4 44 // off_t st_size; /* [XSI] file size, in bytes 8 48 // blkcnt_t st_blocks; /* [XSI] blocks allocated for file 8 // blksize_t st_blksize; /* [XSI] optimal blocksize for I/O 4 // __uint32_t st_flags; /* user defined flags for file 4 // __uint32_t st_gen; /* file generation number 4 // __int32_t st_lspare; /* RESERVED: DO NOT USE! 4 // __int64_t st_qspare[2]; /* RESERVED: DO NOT USE! 16 // };

Field Summary
`static int` | `E2BIG`
`static int` | `EACCES`
`static int` | `EADDRINUSE`
`static int` | `EADDRNOTAVAIL`
`static int` | `EAFNOSUPPORT`
`static int` | `EAGAIN`
`static int` | `EALREADY`
`static int` | `EBADF`
`static int` | `EBADMSG`
`static int` | `EBUSY`
`static int` | `ECANCELED`
`static int` | `ECHILD`
`static int` | `ECONNABORTED`
`static int` | `ECONNREFUSED`
`static int` | `ECONNRESET`
`static int` | `EDEADLK`
`static int` | `EDESTADDRREQ`
`static int` | `EDOM`
`static int` | `EDQUOT`
`static int` | `EEXIST`
`static int` | `EFAULT`
`static int` | `EFBIG`
`static int` | `EHOSTUNREACH`
`static int` | `EIDRM`
`static int` | `EILSEQ`
`static int` | `EINPROGRESS`
`static int` | `EINTR`
`static int` | `EINVAL`
`static int` | `EIO`
`static int` | `EISCONN`
`static int` | `EISDIR`
`static int` | `ELOOP`
`static int` | `EMFILE`
`static int` | `EMLINK`
`static int` | `EMSGSIZE`
`static int` | `EMULTIHOP`
`static int` | `ENAMETOOLONG`
`static int` | `ENETDOWN`
`static int` | `ENETRESET`
`static int` | `ENETUNREACH`
`static int` | `ENFILE`
`static int` | `ENOBUFS`
`static int` | `ENODATA`
`static int` | `ENODEV`
`static int` | `ENOENT`
`static int` | `ENOEXEC`
`static int` | `ENOLCK`
`static int` | `ENOLINK`
`static int` | `ENOMEM`
`static int` | `ENOMSG`
`static int` | `ENOPROTOOPT`
`static int` | `ENOSPC`
`static int` | `ENOSR`
`static int` | `ENOSTR`
`static int` | `ENOSYS`
`static int` | `ENOTCONN`
`static int` | `ENOTDIR`
`static int` | `ENOTEMPTY`
`static int` | `ENOTSOCK`
`static int` | `ENOTSUP`
`static int` | `ENOTTY`
`static int` | `ENXIO`
`static int` | `EOPNOTSUPP`
`static int` | `EOVERFLOW`
`static int` | `EPERM`
`static int` | `EPIPE`
`static int` | `EPROTO`
`static int` | `EPROTONOSUPPORT`
`static int` | `EPROTOTYPE`
`static int` | `ERANGE`
`static int` | `EROFS`
`static int` | `ESPIPE`
`static int` | `ESRCH`
`static int` | `ETIME`
`static int` | `ETIMEDOUT`
`static int` | `ETXTBSY`
`static int` | `EWOULDBLOCK`
`static int` | `EXDEV`
`static int` | `F_DUPFD`
`static int` | `F_GETFD`
`static int` | `F_GETFL`
`static int` | `F_SETFD`
`static int` | `F_SETFL`
`static LibC` | `INSTANCE`
`static int` | `O_ACCMODE`
`static int` | `O_APPEND`
`static int` | `O_CREAT`
`static int` | `O_EXCL`
`static int` | `O_NONBLOCK`
`static int` | `O_RDONLY`
`static int` | `O_RDWR`
`static int` | `O_SYNC`
`static int` | `O_TRUNC`
`static int` | `O_WRONLY`
`static int` | `S_IFBLK`
`static int` | `S_IFCHR`
`static int` | `S_IFDIR`
`static int` | `S_IFIFO`
`static int` | `S_IFLNK`
`static int` | `S_IFMT`
`static int` | `S_IFREG`
`static int` | `S_IFSOCK`
`static int` | `S_IRGRP`
`static int` | `S_IROTH`
`static int` | `S_IRUSR`
`static int` | `S_IRWXG`
`static int` | `S_IRWXO`
`static int` | `S_IRWXU`
`static int` | `S_ISGID`
`static int` | `S_ISUID`
`static int` | `S_ISVTX`
`static int` | `S_IWGRP`
`static int` | `S_IWOTH`
`static int` | `S_IWUSR`
`static int` | `S_IXGRP`
`static int` | `S_IXOTH`
`static int` | `S_IXUSR`
`static int` | `SEEK_CUR`
`static int` | `SEEK_END`
`static int` | `SEEK_SET`

Method Summary
`int` | `close(int fd)` delete a descriptor
`int` | `fcntl(int fd, int cmd, int arg)` provides for control over descriptors.
`int` | `fstat(int fd, LibC.stat stat)` Get information on the open file with file descriptor "fd".
`int` | `fsync(int fd)` Flush output on a descriptor
`int` | `lseek(int fd, long offset, int whence)` reposition read/write file offset
`int` | `open(String name, int oflag, int mode)` open or create a file for reading or writing
`int` | `read(int fd, byte[] buf, int nbyte)` read input
`int` | `stat(String name, LibC.stat stat)` Get information on the named "name".
`int` | `unlink(String name)` Remove the directory entry for name (may delete the file)
`int` | `write(int fd, byte[] buf, int nbyte)` write output

Methods inherited from interface com.sun.cldc.jna.Library
`initConstInt`

Field Detail

### INSTANCE

    static final LibC INSTANCE

### EPERM

    static final int EPERM

### ENOENT

    static final int ENOENT

### ESRCH

    static final int ESRCH

### EINTR

    static final int EINTR

### EIO

    static final int EIO

### ENXIO

    static final int ENXIO

### E2BIG

    static final int E2BIG

### ENOEXEC

    static final int ENOEXEC

### EBADF

    static final int EBADF

### ECHILD

    static final int ECHILD

### EDEADLK

    static final int EDEADLK

### ENOMEM

    static final int ENOMEM

### EACCES

    static final int EACCES

### EFAULT

    static final int EFAULT

### EBUSY

    static final int EBUSY

### EEXIST

    static final int EEXIST

### EXDEV

    static final int EXDEV

### ENODEV

    static final int ENODEV

### ENOTDIR

    static final int ENOTDIR

### EISDIR

    static final int EISDIR

### EINVAL

    static final int EINVAL

### ENFILE

    static final int ENFILE

### EMFILE

    static final int EMFILE

### ENOTTY

    static final int ENOTTY

### ETXTBSY

    static final int ETXTBSY

### EFBIG

    static final int EFBIG

### ENOSPC

    static final int ENOSPC

### ESPIPE

    static final int ESPIPE

### EROFS

    static final int EROFS

### EMLINK

    static final int EMLINK

### EPIPE

    static final int EPIPE

### EDOM

    static final int EDOM

### ERANGE

    static final int ERANGE

### EAGAIN

    static final int EAGAIN

### EWOULDBLOCK

    static final int EWOULDBLOCK

### EINPROGRESS

    static final int EINPROGRESS

### EALREADY

    static final int EALREADY

### ENOTSOCK

    static final int ENOTSOCK

### EDESTADDRREQ

    static final int EDESTADDRREQ

### EMSGSIZE

    static final int EMSGSIZE

### EPROTOTYPE

    static final int EPROTOTYPE

### ENOPROTOOPT

    static final int ENOPROTOOPT

### EPROTONOSUPPORT

    static final int EPROTONOSUPPORT

### ENOTSUP

    static final int ENOTSUP

### EAFNOSUPPORT

    static final int EAFNOSUPPORT

### EADDRINUSE

    static final int EADDRINUSE

### EADDRNOTAVAIL

    static final int EADDRNOTAVAIL

### ENETDOWN

    static final int ENETDOWN

### ENETUNREACH

    static final int ENETUNREACH

### ENETRESET

    static final int ENETRESET

### ECONNABORTED

    static final int ECONNABORTED

### ECONNRESET

    static final int ECONNRESET

### ENOBUFS

    static final int ENOBUFS

### EISCONN

    static final int EISCONN

### ENOTCONN

    static final int ENOTCONN

### ETIMEDOUT

    static final int ETIMEDOUT

### ECONNREFUSED

    static final int ECONNREFUSED

### ELOOP

    static final int ELOOP

### ENAMETOOLONG

    static final int ENAMETOOLONG

### EHOSTUNREACH

    static final int EHOSTUNREACH

### ENOTEMPTY

    static final int ENOTEMPTY

### EDQUOT

    static final int EDQUOT

### ENOLCK

    static final int ENOLCK

### ENOSYS

    static final int ENOSYS

### EOVERFLOW

    static final int EOVERFLOW

### ECANCELED

    static final int ECANCELED

### EIDRM

    static final int EIDRM

### ENOMSG

    static final int ENOMSG

### EILSEQ

    static final int EILSEQ

### EBADMSG

    static final int EBADMSG

### EMULTIHOP

    static final int EMULTIHOP

### ENODATA

    static final int ENODATA

### ENOLINK

    static final int ENOLINK

### ENOSR

    static final int ENOSR

### ENOSTR

    static final int ENOSTR

### EPROTO

    static final int EPROTO

### ETIME

    static final int ETIME

### F_DUPFD

    static final int F_DUPFD

### F_GETFD

    static final int F_GETFD

### F_SETFD

    static final int F_SETFD

### F_GETFL

    static final int F_GETFL

### F_SETFL

    static final int F_SETFL

### O_RDONLY

    static final int O_RDONLY

### O_WRONLY

    static final int O_WRONLY

### O_RDWR

    static final int O_RDWR

### O_ACCMODE

    static final int O_ACCMODE

### O_NONBLOCK

    static final int O_NONBLOCK

### O_APPEND

    static final int O_APPEND

### O_SYNC

    static final int O_SYNC

### O_CREAT

    static final int O_CREAT

### O_TRUNC

    static final int O_TRUNC

### O_EXCL

    static final int O_EXCL

### S_IFBLK

    static final int S_IFBLK

### S_IFCHR

    static final int S_IFCHR

### S_IFDIR

    static final int S_IFDIR

### S_IFIFO

    static final int S_IFIFO

### S_IFLNK

    static final int S_IFLNK

### S_IFMT

    static final int S_IFMT

### S_IFREG

    static final int S_IFREG

### S_IFSOCK

    static final int S_IFSOCK

### S_IRGRP

    static final int S_IRGRP

### S_IROTH

    static final int S_IROTH

### S_IRUSR

    static final int S_IRUSR

### S_IRWXG

    static final int S_IRWXG

### S_IRWXO

    static final int S_IRWXO

### S_IRWXU

    static final int S_IRWXU

### S_ISGID

    static final int S_ISGID

### S_ISUID

    static final int S_ISUID

### S_ISVTX

    static final int S_ISVTX

### S_IWGRP

    static final int S_IWGRP

### S_IWOTH

    static final int S_IWOTH

### S_IWUSR

    static final int S_IWUSR

### S_IXGRP

    static final int S_IXGRP

### S_IXOTH

    static final int S_IXOTH

### S_IXUSR

    static final int S_IXUSR

### SEEK_SET

    static final int SEEK_SET

### SEEK_CUR

    static final int SEEK_CUR

### SEEK_END

    static final int SEEK_END

### EOPNOTSUPP

    static final int EOPNOTSUPP

Method Detail

### fcntl

    int fcntl(int fd,
              int cmd,
              int arg)

  provides for control over descriptors.

  Parameters:
    `fd` - a descriptor to be operated on by cmd
    `cmd` - one of the cmd constants
    `arg` -
  Returns:
    a value that depends on the cmd.

### open

    int open(String name,
             int oflag,
             int mode)

  open or create a file for reading or writing

  Parameters:
    `name` - String
    `oflag` - std libc open flags
    `mode` - the mode for any created file
  Returns:
    If successful, returns a non-negative integer, termed a file descriptor. Returns -1 on failure, and sets errno to indicate the error.

### close

    int close(int fd)

  delete a descriptor

  Parameters:
    `fd` - a descriptor to be operated on by cmd
  Returns:
    Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global integer variable errno is set to indicate the error.

### fsync

    int fsync(int fd)

  Flush output on a descriptor

  Parameters:
    `fd` - a descriptor to be flushed
  Returns:
    Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global integer variable errno is set to indicate the error.

### lseek

    int lseek(int fd,
              long offset,
              int whence)

  reposition read/write file offset

  Parameters:
    `fd` - file descriptor
    `offset` - the offset to seek to
    `whence` - the kind of offset (SEEK_SET, SEEK_CUR, or SEEK_END)
  Returns:
    the resulting offset location as measured in bytes from the beginning of the file. If error, -1 is returned and errno is set to indicate the error.

### read

    int read(int fd,
             byte[] buf,
             int nbyte)

  read input

  Parameters:
    `fd` - file descriptor
    `buf` - data buffer to read into
    `nbyte` - number of bytes to read
  Returns:
    the number of bytes actually read is returned. Upon reading end-of-file, zero is returned. If error, a -1 is returned and the global variable errno is set to indicate the error

### write

    int write(int fd,
              byte[] buf,
              int nbyte)

  write output

  Parameters:
    `fd` - file descriptor
    `buf` - data buffer to write
    `nbyte` - number of bytes to read
  Returns:
    the number of bytes which were written is returned. If error, -1 is returned and the global variable errno is set to indicate the error.

### fstat

    int fstat(int fd,
              LibC.stat stat)

  Get information on the open file with file descriptor "fd".

  Parameters:
    `fd` - file descriptor
    `stat` - Stat structure that will be filled with the current values
  Returns:
    -1 is returned if an error occurs, otherwise zero is returned

### stat

    int stat(String name,
             LibC.stat stat)

  Get information on the named "name".

  Parameters:
    `name` - String
    `stat` - Stat structure that will be filled with the current values
  Returns:
    -1 is returned if an error occurs, otherwise zero is returned

### unlink

    int unlink(String name)

  Remove the directory entry for name (may delete the file)

  Parameters:
    `name` - String
  Returns:
    If successful, returns a non-negative integer, termed a file descriptor. Returns -1 on failure, and sets errno to indicate the error.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"