Package libcore.io
Class BlockGuardOs
java.lang.Object
libcore.io.ForwardingOs
libcore.io.BlockGuardOs
- All Implemented Interfaces:
Os
public class BlockGuardOs extends ForwardingOs
Informs BlockGuard of any activity it should be aware of.
-
Field Summary
Fields inherited from class libcore.io.ForwardingOs
os -
Constructor Summary
Constructors Constructor Description BlockGuardOs(Os os) -
Method Summary
Modifier and Type Method Description FileDescriptoraccept(FileDescriptor fd, InetSocketAddress peerAddress)voidclose(FileDescriptor fd)voidconnect(FileDescriptor fd, InetAddress address, int port)voidfdatasync(FileDescriptor fd)voidfsync(FileDescriptor fd)voidftruncate(FileDescriptor fd, long length)FileDescriptoropen(String path, int flags, int mode)intpoll(StructPollfd[] fds, int timeoutMs)intpread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)intpread(FileDescriptor fd, ByteBuffer buffer, long offset)intpwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset)intpwrite(FileDescriptor fd, ByteBuffer buffer, long offset)intread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)intread(FileDescriptor fd, ByteBuffer buffer)intreadv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)intrecvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intrecvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)intsendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intsendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)FileDescriptorsocket(int domain, int type, int protocol)voidsocketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2)intwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount)intwrite(FileDescriptor fd, ByteBuffer buffer)intwritev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts)Methods inherited from class libcore.io.ForwardingOs
access, bind, chmod, chown, dup, dup2, environ, execv, execve, fchmod, fchown, fcntlFlock, fcntlLong, fcntlVoid, fstat, fstatvfs, gai_strerror, getaddrinfo, getegid, getenv, geteuid, getgid, getnameinfo, getpeername, getpid, getppid, getpwnam, getpwuid, getsockname, getsockoptByte, getsockoptInAddr, getsockoptInt, getsockoptLinger, getsockoptTimeval, getsockoptUcred, gettid, getuid, if_indextoname, inet_pton, ioctlInetAddress, ioctlInt, isatty, kill, lchown, listen, lseek, lstat, mincore, mkdir, mlock, mmap, msync, munlock, munmap, pipe, remove, rename, sendfile, setegid, setenv, seteuid, setgid, setsid, setsockoptByte, setsockoptGroupReq, setsockoptIfreq, setsockoptInt, setsockoptIpMreqn, setsockoptLinger, setsockoptTimeval, setuid, shutdown, stat, statvfs, strerror, strsignal, symlink, sysconf, tcdrain, tcsendbreak, umask, uname, unsetenv, waitpid
-
Constructor Details
-
BlockGuardOs
-
-
Method Details
-
accept
public FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException- Specified by:
acceptin interfaceOs- Overrides:
acceptin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
close
- Specified by:
closein interfaceOs- Overrides:
closein classForwardingOs- Throws:
ErrnoException
-
connect
public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException- Specified by:
connectin interfaceOs- Overrides:
connectin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
fdatasync
- Specified by:
fdatasyncin interfaceOs- Overrides:
fdatasyncin classForwardingOs- Throws:
ErrnoException
-
fsync
- Specified by:
fsyncin interfaceOs- Overrides:
fsyncin classForwardingOs- Throws:
ErrnoException
-
ftruncate
- Specified by:
ftruncatein interfaceOs- Overrides:
ftruncatein classForwardingOs- Throws:
ErrnoException
-
open
- Specified by:
openin interfaceOs- Overrides:
openin classForwardingOs- Throws:
ErrnoException
-
poll
- Specified by:
pollin interfaceOs- Overrides:
pollin classForwardingOs- Throws:
ErrnoException
-
pread
- Specified by:
preadin interfaceOs- Overrides:
preadin classForwardingOs- Throws:
ErrnoException
-
pread
public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException- Specified by:
preadin interfaceOs- Overrides:
preadin classForwardingOs- Throws:
ErrnoException
-
pwrite
- Specified by:
pwritein interfaceOs- Overrides:
pwritein classForwardingOs- Throws:
ErrnoException
-
pwrite
public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException- Specified by:
pwritein interfaceOs- Overrides:
pwritein classForwardingOs- Throws:
ErrnoException
-
read
- Specified by:
readin interfaceOs- Overrides:
readin classForwardingOs- Throws:
ErrnoException
-
read
public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException- Specified by:
readin interfaceOs- Overrides:
readin classForwardingOs- Throws:
ErrnoException
-
readv
public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException- Specified by:
readvin interfaceOs- Overrides:
readvin classForwardingOs- Throws:
ErrnoException
-
recvfrom
public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException- Specified by:
recvfromin interfaceOs- Overrides:
recvfromin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
recvfrom
public int recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException- Specified by:
recvfromin interfaceOs- Overrides:
recvfromin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
sendto
public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException- Specified by:
sendtoin interfaceOs- Overrides:
sendtoin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
sendto
public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException- Specified by:
sendtoin interfaceOs- Overrides:
sendtoin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
socket
- Specified by:
socketin interfaceOs- Overrides:
socketin classForwardingOs- Throws:
ErrnoException
-
socketpair
public void socketpair(int domain, int type, int protocol, FileDescriptor fd1, FileDescriptor fd2) throws ErrnoException- Specified by:
socketpairin interfaceOs- Overrides:
socketpairin classForwardingOs- Throws:
ErrnoException
-
write
- Specified by:
writein interfaceOs- Overrides:
writein classForwardingOs- Throws:
ErrnoException
-
write
public int write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException- Specified by:
writein interfaceOs- Overrides:
writein classForwardingOs- Throws:
ErrnoException
-
writev
public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException- Specified by:
writevin interfaceOs- Overrides:
writevin classForwardingOs- Throws:
ErrnoException
-