"

2013 FRC Java API

"

com.sun.squawk.platform.windows.natives
Class LibCImpl

java.lang.Object
  extended by com.sun.squawk.platform.windows.natives.LibCImpl
All Implemented Interfaces:
Library, LibC

public class LibCImpl
extends Object
implements LibC


Nested Class Summary
static class LibCImpl.statImpl
           
 
Nested classes/interfaces inherited from interface com.sun.squawk.platform.windows.natives.LibC
LibC.stat
 
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 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
           
 
Fields inherited from interface com.sun.squawk.platform.windows.natives.LibC
INSTANCE
 
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 initConstInt(int index)
           
 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
 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
 

Field Detail

EPERM

public static final int EPERM
See Also:
Constant Field Values

ENOENT

public static final int ENOENT
See Also:
Constant Field Values

ESRCH

public static final int ESRCH
See Also:
Constant Field Values

EINTR

public static final int EINTR
See Also:
Constant Field Values

EIO

public static final int EIO
See Also:
Constant Field Values

ENXIO

public static final int ENXIO
See Also:
Constant Field Values

E2BIG

public static final int E2BIG
See Also:
Constant Field Values

ENOEXEC

public static final int ENOEXEC
See Also:
Constant Field Values

EBADF

public static final int EBADF
See Also:
Constant Field Values

ECHILD

public static final int ECHILD
See Also:
Constant Field Values

EDEADLK

public static final int EDEADLK
See Also:
Constant Field Values

ENOMEM

public static final int ENOMEM
See Also:
Constant Field Values

EACCES

public static final int EACCES
See Also:
Constant Field Values

EFAULT

public static final int EFAULT
See Also:
Constant Field Values

EBUSY

public static final int EBUSY
See Also:
Constant Field Values

EEXIST

public static final int EEXIST
See Also:
Constant Field Values

EXDEV

public static final int EXDEV
See Also:
Constant Field Values

ENODEV

public static final int ENODEV
See Also:
Constant Field Values

ENOTDIR

public static final int ENOTDIR
See Also:
Constant Field Values

EISDIR

public static final int EISDIR
See Also:
Constant Field Values

EINVAL

public static final int EINVAL
See Also:
Constant Field Values

ENFILE

public static final int ENFILE
See Also:
Constant Field Values

EMFILE

public static final int EMFILE
See Also:
Constant Field Values

ENOTTY

public static final int ENOTTY
See Also:
Constant Field Values

ETXTBSY

public static final int ETXTBSY
See Also:
Constant Field Values

EFBIG

public static final int EFBIG
See Also:
Constant Field Values

ENOSPC

public static final int ENOSPC
See Also:
Constant Field Values

ESPIPE

public static final int ESPIPE
See Also:
Constant Field Values

EROFS

public static final int EROFS
See Also:
Constant Field Values

EMLINK

public static final int EMLINK
See Also:
Constant Field Values

EPIPE

public static final int EPIPE
See Also:
Constant Field Values

EDOM

public static final int EDOM
See Also:
Constant Field Values

ERANGE

public static final int ERANGE
See Also:
Constant Field Values

EAGAIN

public static final int EAGAIN
See Also:
Constant Field Values

EWOULDBLOCK

public static final int EWOULDBLOCK
See Also:
Constant Field Values

EINPROGRESS

public static final int EINPROGRESS
See Also:
Constant Field Values

EALREADY

public static final int EALREADY
See Also:
Constant Field Values

ENOTSOCK

public static final int ENOTSOCK
See Also:
Constant Field Values

EDESTADDRREQ

public static final int EDESTADDRREQ
See Also:
Constant Field Values

EMSGSIZE

public static final int EMSGSIZE
See Also:
Constant Field Values

EPROTOTYPE

public static final int EPROTOTYPE
See Also:
Constant Field Values

ENOPROTOOPT

public static final int ENOPROTOOPT
See Also:
Constant Field Values

EPROTONOSUPPORT

public static final int EPROTONOSUPPORT
See Also:
Constant Field Values

ENOTSUP

public static final int ENOTSUP
See Also:
Constant Field Values

EAFNOSUPPORT

public static final int EAFNOSUPPORT
See Also:
Constant Field Values

EADDRINUSE

public static final int EADDRINUSE
See Also:
Constant Field Values

EADDRNOTAVAIL

public static final int EADDRNOTAVAIL
See Also:
Constant Field Values

ENETDOWN

public static final int ENETDOWN
See Also:
Constant Field Values

ENETUNREACH

public static final int ENETUNREACH
See Also:
Constant Field Values

ENETRESET

public static final int ENETRESET
See Also:
Constant Field Values

ECONNABORTED

public static final int ECONNABORTED
See Also:
Constant Field Values

ECONNRESET

public static final int ECONNRESET
See Also:
Constant Field Values

ENOBUFS

public static final int ENOBUFS
See Also:
Constant Field Values

EISCONN

public static final int EISCONN
See Also:
Constant Field Values

ENOTCONN

public static final int ENOTCONN
See Also:
Constant Field Values

ETIMEDOUT

public static final int ETIMEDOUT
See Also:
Constant Field Values

ECONNREFUSED

public static final int ECONNREFUSED
See Also:
Constant Field Values

ELOOP

public static final int ELOOP
See Also:
Constant Field Values

ENAMETOOLONG

public static final int ENAMETOOLONG
See Also:
Constant Field Values

EHOSTUNREACH

public static final int EHOSTUNREACH
See Also:
Constant Field Values

ENOTEMPTY

public static final int ENOTEMPTY
See Also:
Constant Field Values

EDQUOT

public static final int EDQUOT
See Also:
Constant Field Values

ENOLCK

public static final int ENOLCK
See Also:
Constant Field Values

ENOSYS

public static final int ENOSYS
See Also:
Constant Field Values

EOVERFLOW

public static final int EOVERFLOW
See Also:
Constant Field Values

ECANCELED

public static final int ECANCELED
See Also:
Constant Field Values

EIDRM

public static final int EIDRM
See Also:
Constant Field Values

ENOMSG

public static final int ENOMSG
See Also:
Constant Field Values

EILSEQ

public static final int EILSEQ
See Also:
Constant Field Values

EBADMSG

public static final int EBADMSG
See Also:
Constant Field Values

EMULTIHOP

public static final int EMULTIHOP
See Also:
Constant Field Values

ENODATA

public static final int ENODATA
See Also:
Constant Field Values

ENOLINK

public static final int ENOLINK
See Also:
Constant Field Values

ENOSR

public static final int ENOSR
See Also:
Constant Field Values

ENOSTR

public static final int ENOSTR
See Also:
Constant Field Values

EPROTO

public static final int EPROTO
See Also:
Constant Field Values

ETIME

public static final int ETIME
See Also:
Constant Field Values

F_DUPFD

public static final int F_DUPFD
See Also:
Constant Field Values

F_GETFD

public static final int F_GETFD
See Also:
Constant Field Values

F_SETFD

public static final int F_SETFD
See Also:
Constant Field Values

F_GETFL

public static final int F_GETFL
See Also:
Constant Field Values

F_SETFL

public static final int F_SETFL
See Also:
Constant Field Values

O_RDONLY

public static final int O_RDONLY
See Also:
Constant Field Values

O_WRONLY

public static final int O_WRONLY
See Also:
Constant Field Values

O_RDWR

public static final int O_RDWR
See Also:
Constant Field Values

O_ACCMODE

public static final int O_ACCMODE
See Also:
Constant Field Values

O_NONBLOCK

public static final int O_NONBLOCK
See Also:
Constant Field Values

O_APPEND

public static final int O_APPEND
See Also:
Constant Field Values

O_SYNC

public static final int O_SYNC
See Also:
Constant Field Values

O_CREAT

public static final int O_CREAT
See Also:
Constant Field Values

O_TRUNC

public static final int O_TRUNC
See Also:
Constant Field Values

O_EXCL

public static final int O_EXCL
See Also:
Constant Field Values

S_IFBLK

public static final int S_IFBLK
See Also:
Constant Field Values

S_IFCHR

public static final int S_IFCHR
See Also:
Constant Field Values

S_IFDIR

public static final int S_IFDIR
See Also:
Constant Field Values

S_IFIFO

public static final int S_IFIFO
See Also:
Constant Field Values

S_IFLNK

public static final int S_IFLNK
See Also:
Constant Field Values

S_IFMT

public static final int S_IFMT
See Also:
Constant Field Values

S_IFREG

public static final int S_IFREG
See Also:
Constant Field Values

S_IFSOCK

public static final int S_IFSOCK
See Also:
Constant Field Values

S_IRGRP

public static final int S_IRGRP
See Also:
Constant Field Values

S_IROTH

public static final int S_IROTH
See Also:
Constant Field Values

S_IRUSR

public static final int S_IRUSR
See Also:
Constant Field Values

S_IRWXG

public static final int S_IRWXG
See Also:
Constant Field Values

S_IRWXO

public static final int S_IRWXO
See Also:
Constant Field Values

S_IRWXU

public static final int S_IRWXU
See Also:
Constant Field Values

S_ISGID

public static final int S_ISGID
See Also:
Constant Field Values

S_ISUID

public static final int S_ISUID
See Also:
Constant Field Values

S_ISVTX

public static final int S_ISVTX
See Also:
Constant Field Values

S_IWGRP

public static final int S_IWGRP
See Also:
Constant Field Values

S_IWOTH

public static final int S_IWOTH
See Also:
Constant Field Values

S_IWUSR

public static final int S_IWUSR
See Also:
Constant Field Values

S_IXGRP

public static final int S_IXGRP
See Also:
Constant Field Values

S_IXOTH

public static final int S_IXOTH
See Also:
Constant Field Values

S_IXUSR

public static final int S_IXUSR
See Also:
Constant Field Values

SEEK_SET

public static final int SEEK_SET
See Also:
Constant Field Values

SEEK_CUR

public static final int SEEK_CUR
See Also:
Constant Field Values

SEEK_END

public static final int SEEK_END
See Also:
Constant Field Values
Constructor Detail

LibCImpl

public LibCImpl()
Method Detail

initConstInt

public int initConstInt(int index)
Specified by:
initConstInt in interface Library

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.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"