"

2013 FRC Java API

"

com.sun.squawk.platform.windows.natives
Interface LibC

All Superinterfaces:
Library
All Known Implementing Classes:
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 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
See Also:
Constant Field Values

ENOENT

static final int ENOENT
See Also:
Constant Field Values

ESRCH

static final int ESRCH
See Also:
Constant Field Values

EINTR

static final int EINTR
See Also:
Constant Field Values

EIO

static final int EIO
See Also:
Constant Field Values

ENXIO

static final int ENXIO
See Also:
Constant Field Values

E2BIG

static final int E2BIG
See Also:
Constant Field Values

ENOEXEC

static final int ENOEXEC
See Also:
Constant Field Values

EBADF

static final int EBADF
See Also:
Constant Field Values

ECHILD

static final int ECHILD
See Also:
Constant Field Values

EDEADLK

static final int EDEADLK
See Also:
Constant Field Values

ENOMEM

static final int ENOMEM
See Also:
Constant Field Values

EACCES

static final int EACCES
See Also:
Constant Field Values

EFAULT

static final int EFAULT
See Also:
Constant Field Values

EBUSY

static final int EBUSY
See Also:
Constant Field Values

EEXIST

static final int EEXIST
See Also:
Constant Field Values

EXDEV

static final int EXDEV
See Also:
Constant Field Values

ENODEV

static final int ENODEV
See Also:
Constant Field Values

ENOTDIR

static final int ENOTDIR
See Also:
Constant Field Values

EISDIR

static final int EISDIR
See Also:
Constant Field Values

EINVAL

static final int EINVAL
See Also:
Constant Field Values

ENFILE

static final int ENFILE
See Also:
Constant Field Values

EMFILE

static final int EMFILE
See Also:
Constant Field Values

ENOTTY

static final int ENOTTY
See Also:
Constant Field Values

ETXTBSY

static final int ETXTBSY
See Also:
Constant Field Values

EFBIG

static final int EFBIG
See Also:
Constant Field Values

ENOSPC

static final int ENOSPC
See Also:
Constant Field Values

ESPIPE

static final int ESPIPE
See Also:
Constant Field Values

EROFS

static final int EROFS
See Also:
Constant Field Values

EMLINK

static final int EMLINK
See Also:
Constant Field Values

EPIPE

static final int EPIPE
See Also:
Constant Field Values

EDOM

static final int EDOM
See Also:
Constant Field Values

ERANGE

static final int ERANGE
See Also:
Constant Field Values

EAGAIN

static final int EAGAIN
See Also:
Constant Field Values

EWOULDBLOCK

static final int EWOULDBLOCK
See Also:
Constant Field Values

EINPROGRESS

static final int EINPROGRESS
See Also:
Constant Field Values

EALREADY

static final int EALREADY
See Also:
Constant Field Values

ENOTSOCK

static final int ENOTSOCK
See Also:
Constant Field Values

EDESTADDRREQ

static final int EDESTADDRREQ
See Also:
Constant Field Values

EMSGSIZE

static final int EMSGSIZE
See Also:
Constant Field Values

EPROTOTYPE

static final int EPROTOTYPE
See Also:
Constant Field Values

ENOPROTOOPT

static final int ENOPROTOOPT
See Also:
Constant Field Values

EPROTONOSUPPORT

static final int EPROTONOSUPPORT
See Also:
Constant Field Values

ENOTSUP

static final int ENOTSUP
See Also:
Constant Field Values

EAFNOSUPPORT

static final int EAFNOSUPPORT
See Also:
Constant Field Values

EADDRINUSE

static final int EADDRINUSE
See Also:
Constant Field Values

EADDRNOTAVAIL

static final int EADDRNOTAVAIL
See Also:
Constant Field Values

ENETDOWN

static final int ENETDOWN
See Also:
Constant Field Values

ENETUNREACH

static final int ENETUNREACH
See Also:
Constant Field Values

ENETRESET

static final int ENETRESET
See Also:
Constant Field Values

ECONNABORTED

static final int ECONNABORTED
See Also:
Constant Field Values

ECONNRESET

static final int ECONNRESET
See Also:
Constant Field Values

ENOBUFS

static final int ENOBUFS
See Also:
Constant Field Values

EISCONN

static final int EISCONN
See Also:
Constant Field Values

ENOTCONN

static final int ENOTCONN
See Also:
Constant Field Values

ETIMEDOUT

static final int ETIMEDOUT
See Also:
Constant Field Values

ECONNREFUSED

static final int ECONNREFUSED
See Also:
Constant Field Values

ELOOP

static final int ELOOP
See Also:
Constant Field Values

ENAMETOOLONG

static final int ENAMETOOLONG
See Also:
Constant Field Values

EHOSTUNREACH

static final int EHOSTUNREACH
See Also:
Constant Field Values

ENOTEMPTY

static final int ENOTEMPTY
See Also:
Constant Field Values

EDQUOT

static final int EDQUOT
See Also:
Constant Field Values

ENOLCK

static final int ENOLCK
See Also:
Constant Field Values

ENOSYS

static final int ENOSYS
See Also:
Constant Field Values

EOVERFLOW

static final int EOVERFLOW
See Also:
Constant Field Values

ECANCELED

static final int ECANCELED
See Also:
Constant Field Values

EIDRM

static final int EIDRM
See Also:
Constant Field Values

ENOMSG

static final int ENOMSG
See Also:
Constant Field Values

EILSEQ

static final int EILSEQ
See Also:
Constant Field Values

EBADMSG

static final int EBADMSG
See Also:
Constant Field Values

EMULTIHOP

static final int EMULTIHOP
See Also:
Constant Field Values

ENODATA

static final int ENODATA
See Also:
Constant Field Values

ENOLINK

static final int ENOLINK
See Also:
Constant Field Values

ENOSR

static final int ENOSR
See Also:
Constant Field Values

ENOSTR

static final int ENOSTR
See Also:
Constant Field Values

EPROTO

static final int EPROTO
See Also:
Constant Field Values

ETIME

static final int ETIME
See Also:
Constant Field Values

F_DUPFD

static final int F_DUPFD
See Also:
Constant Field Values

F_GETFD

static final int F_GETFD
See Also:
Constant Field Values

F_SETFD

static final int F_SETFD
See Also:
Constant Field Values

F_GETFL

static final int F_GETFL
See Also:
Constant Field Values

F_SETFL

static final int F_SETFL
See Also:
Constant Field Values

O_RDONLY

static final int O_RDONLY
See Also:
Constant Field Values

O_WRONLY

static final int O_WRONLY
See Also:
Constant Field Values

O_RDWR

static final int O_RDWR
See Also:
Constant Field Values

O_ACCMODE

static final int O_ACCMODE
See Also:
Constant Field Values

O_NONBLOCK

static final int O_NONBLOCK
See Also:
Constant Field Values

O_APPEND

static final int O_APPEND
See Also:
Constant Field Values

O_SYNC

static final int O_SYNC
See Also:
Constant Field Values

O_CREAT

static final int O_CREAT
See Also:
Constant Field Values

O_TRUNC

static final int O_TRUNC
See Also:
Constant Field Values

O_EXCL

static final int O_EXCL
See Also:
Constant Field Values

S_IFBLK

static final int S_IFBLK
See Also:
Constant Field Values

S_IFCHR

static final int S_IFCHR
See Also:
Constant Field Values

S_IFDIR

static final int S_IFDIR
See Also:
Constant Field Values

S_IFIFO

static final int S_IFIFO
See Also:
Constant Field Values

S_IFLNK

static final int S_IFLNK
See Also:
Constant Field Values

S_IFMT

static final int S_IFMT
See Also:
Constant Field Values

S_IFREG

static final int S_IFREG
See Also:
Constant Field Values

S_IFSOCK

static final int S_IFSOCK
See Also:
Constant Field Values

S_IRGRP

static final int S_IRGRP
See Also:
Constant Field Values

S_IROTH

static final int S_IROTH
See Also:
Constant Field Values

S_IRUSR

static final int S_IRUSR
See Also:
Constant Field Values

S_IRWXG

static final int S_IRWXG
See Also:
Constant Field Values

S_IRWXO

static final int S_IRWXO
See Also:
Constant Field Values

S_IRWXU

static final int S_IRWXU
See Also:
Constant Field Values

S_ISGID

static final int S_ISGID
See Also:
Constant Field Values

S_ISUID

static final int S_ISUID
See Also:
Constant Field Values

S_ISVTX

static final int S_ISVTX
See Also:
Constant Field Values

S_IWGRP

static final int S_IWGRP
See Also:
Constant Field Values

S_IWOTH

static final int S_IWOTH
See Also:
Constant Field Values

S_IWUSR

static final int S_IWUSR
See Also:
Constant Field Values

S_IXGRP

static final int S_IXGRP
See Also:
Constant Field Values

S_IXOTH

static final int S_IXOTH
See Also:
Constant Field Values

S_IXUSR

static final int S_IXUSR
See Also:
Constant Field Values

SEEK_SET

static final int SEEK_SET
See Also:
Constant Field Values

SEEK_CUR

static final int SEEK_CUR
See Also:
Constant Field Values

SEEK_END

static final int SEEK_END
See Also:
Constant Field Values
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.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"