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
Class LibCImpl

    java.lang.Object
      com.sun.squawk.platform.posix.natives.LibCImpl

All Implemented Interfaces:
  Library, LibC

Direct Known Subclasses:
  LibCImpl, LibCImpl, LibCImpl, LibCImpl

    public abstract class LibCImpl

extends Object
implements LibC

Nested Class Summary
`static class` | `LibCImpl.statImpl`

Nested classes/interfaces inherited from interface com.sun.squawk.platform.posix.natives.LibC
`LibC.stat`

Field Summary
`protected Function` | `closePtr`
`protected Function` | `fcntlPtr`
`protected Function` | `fstatPtr`
`protected Function` | `fsyncPtr`
`protected Function` | `lseekPtr`
`protected Function` | `openPtr`
`protected Function` | `readPtr`
`protected Function` | `statPtr`
`protected Function` | `unlinkPtr`
`protected Function` | `writePtr`

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

Constructor Summary
`LibCImpl()`

Method Summary
`int` | `close(int arg0)` delete a descriptor
`int` | `fcntl(int arg0, int arg1, int arg2)` provides for control over descriptors.
`int` | `fstat(int arg0, LibC.stat arg1)` Get information on the open file with file descriptor "fd".
`int` | `fsync(int arg0)` Flush output on a descriptor
`int` | `lseek(int arg0, long arg1, int arg2)` reposition read/write file offset
`int` | `open(String arg0, int arg1, int arg2)` open or create a file for reading or writing
`int` | `read(int arg0, byte[] arg1, int arg2)` read input
`String` | `realName(String nominalName)` Allow platforms to substitute different names.
`int` | `stat(String arg0, LibC.stat arg1)` Get information on the named "name".
`int` | `unlink(String arg0)` Remove the directory entry for name (may delete the file)
`int` | `write(int arg0, byte[] arg1, int arg2)` write output

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

Field Detail

### openPtr

    protected final Function openPtr

### statPtr

    protected final Function statPtr

### fcntlPtr

    protected final Function fcntlPtr

### writePtr

    protected final Function writePtr

### closePtr

    protected final Function closePtr

### readPtr

    protected final Function readPtr

### fstatPtr

    protected final Function fstatPtr

### fsyncPtr

    protected final Function fsyncPtr

### lseekPtr

    protected final Function lseekPtr

### unlinkPtr

    protected final Function unlinkPtr

Constructor Detail

### LibCImpl

    public LibCImpl()

Method Detail

### open

    public int open(String arg0,
                    int arg1,
                    int arg2)

  Description copied from interface: `LibC`
  open or create a file for reading or writing

  Specified by:
    `open` in interface `LibC`
  Parameters:
    `arg0` - String
    `arg1` - std libc open flags
    `arg2` - 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.

### stat

    public int stat(String arg0,
                    LibC.stat arg1)

  Description copied from interface: `LibC`
  Get information on the named "name".

  Specified by:
    `stat` in interface `LibC`
  Parameters:
    `arg0` - String
    `arg1` - Stat structure that will be filled with the current values
  Returns:
    -1 is returned if an error occurs, otherwise zero is returned

### fcntl

    public int fcntl(int arg0,
                     int arg1,
                     int arg2)

  Description copied from interface: `LibC`
  provides for control over descriptors.

  Specified by:
    `fcntl` in interface `LibC`
  Parameters:
    `arg0` - a descriptor to be operated on by cmd
    `arg1` - one of the cmd constants
  Returns:
    a value that depends on the cmd.

### write

    public int write(int arg0,
                     byte[] arg1,
                     int arg2)

  Description copied from interface: `LibC`
  write output

  Specified by:
    `write` in interface `LibC`
  Parameters:
    `arg0` - file descriptor
    `arg1` - data buffer to write
    `arg2` - 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.

### close

    public int close(int arg0)

  Description copied from interface: `LibC`
  delete a descriptor

  Specified by:
    `close` in interface `LibC`
  Parameters:
    `arg0` - 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.

### read

    public int read(int arg0,
                    byte[] arg1,
                    int arg2)

  Description copied from interface: `LibC`
  read input

  Specified by:
    `read` in interface `LibC`
  Parameters:
    `arg0` - file descriptor
    `arg1` - data buffer to read into
    `arg2` - 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

### fstat

    public int fstat(int arg0,
                     LibC.stat arg1)

  Description copied from interface: `LibC`
  Get information on the open file with file descriptor "fd".

  Specified by:
    `fstat` in interface `LibC`
  Parameters:
    `arg0` - file descriptor
    `arg1` - Stat structure that will be filled with the current values
  Returns:
    -1 is returned if an error occurs, otherwise zero is returned

### fsync

    public int fsync(int arg0)

  Description copied from interface: `LibC`
  Flush output on a descriptor

  Specified by:
    `fsync` in interface `LibC`
  Parameters:
    `arg0` - 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

    public int lseek(int arg0,
                     long arg1,
                     int arg2)

  Description copied from interface: `LibC`
  reposition read/write file offset

  Specified by:
    `lseek` in interface `LibC`
  Parameters:
    `arg0` - file descriptor
    `arg1` - the offset to seek to
    `arg2` - 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.

### unlink

    public int unlink(String arg0)

  Description copied from interface: `LibC`
  Remove the directory entry for name (may delete the file)

  Specified by:
    `unlink` in interface `LibC`
  Parameters:
    `arg0` - String
  Returns:
    If successful, returns a non-negative integer, termed a file descriptor. Returns -1 on failure, and sets errno to indicate the error.

### realName

    public String realName(String nominalName)

  Allow platforms to substitute different names.

  Parameters:
    `nominalName` -
  Returns:
    the actual name for the platform

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
"