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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileDescriptoraccept(FileDescriptor fd, SocketAddress peerAddress)booleanaccess(String path, int mode)voidchmod(String path, int mode)voidchown(String path, int uid, int gid)voidclose(FileDescriptor fd)voidconnect(FileDescriptor fd, InetAddress address, int port)voidfchmod(FileDescriptor fd, int mode)voidfchown(FileDescriptor fd, int uid, int gid)voidfdatasync(FileDescriptor fd)StructStatfstat(FileDescriptor fd)StructStatVfsfstatvfs(FileDescriptor fd)voidfsync(FileDescriptor fd)voidftruncate(FileDescriptor fd, long length)voidlchown(String path, int uid, int gid)voidlink(String oldPath, String newPath)longlseek(FileDescriptor fd, long offset, int whence)StructStatlstat(String path)voidmkdir(String path, int mode)voidmkfifo(String path, int mode)FileDescriptoropen(String path, int flags, int mode)intpoll(StructPollfd[] fds, int timeoutMs)voidposix_fallocate(FileDescriptor fd, long offset, long length)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)Stringreadlink(String path)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)voidremove(String path)voidrename(String oldPath, String newPath)longsendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount)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)StructStatstat(String path)StructStatVfsstatvfs(String path)voidsymlink(String oldPath, String newPath)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
android_getaddrinfo, bind, bind, connect, dup, dup2, environ, execv, execve, fcntlFlock, fcntlInt, fcntlVoid, gai_strerror, getegid, getenv, geteuid, getgid, getnameinfo, getpeername, getpgid, getpid, getppid, getpwnam, getpwuid, getsockname, getsockoptByte, getsockoptInAddr, getsockoptInt, getsockoptLinger, getsockoptTimeval, getsockoptUcred, gettid, getuid, getxattr, if_indextoname, inet_pton, ioctlInetAddress, ioctlInt, isatty, kill, listen, mincore, mlock, mmap, msync, munlock, munmap, pipe2, prctl, removexattr, sendto, setegid, setenv, seteuid, setgid, setpgid, setregid, setreuid, setsid, setsockoptByte, setsockoptGroupReq, setsockoptGroupSourceReq, setsockoptIfreq, setsockoptInt, setsockoptIpMreqn, setsockoptLinger, setsockoptTimeval, setuid, setxattr, shutdown, strerror, strsignal, sysconf, tcdrain, tcsendbreak, umask, uname, unlink, unsetenv, waitpid
-
-
-
-
Constructor Detail
-
BlockGuardOs
public BlockGuardOs(Os os)
-
-
Method Detail
-
accept
public FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException
- Specified by:
acceptin interfaceOs- Overrides:
acceptin classForwardingOs- Throws:
ErrnoExceptionSocketException
-
access
public boolean access(String path, int mode) throws ErrnoException
- Specified by:
accessin interfaceOs- Overrides:
accessin classForwardingOs- Throws:
ErrnoException
-
chmod
public void chmod(String path, int mode) throws ErrnoException
- Specified by:
chmodin interfaceOs- Overrides:
chmodin classForwardingOs- Throws:
ErrnoException
-
chown
public void chown(String path, int uid, int gid) throws ErrnoException
- Specified by:
chownin interfaceOs- Overrides:
chownin classForwardingOs- Throws:
ErrnoException
-
close
public void close(FileDescriptor fd) throws ErrnoException
- 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
-
fchmod
public void fchmod(FileDescriptor fd, int mode) throws ErrnoException
- Specified by:
fchmodin interfaceOs- Overrides:
fchmodin classForwardingOs- Throws:
ErrnoException
-
fchown
public void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException
- Specified by:
fchownin interfaceOs- Overrides:
fchownin classForwardingOs- Throws:
ErrnoException
-
fdatasync
public void fdatasync(FileDescriptor fd) throws ErrnoException
- Specified by:
fdatasyncin interfaceOs- Overrides:
fdatasyncin classForwardingOs- Throws:
ErrnoException
-
fstat
public StructStat fstat(FileDescriptor fd) throws ErrnoException
- Specified by:
fstatin interfaceOs- Overrides:
fstatin classForwardingOs- Throws:
ErrnoException
-
fstatvfs
public StructStatVfs fstatvfs(FileDescriptor fd) throws ErrnoException
- Specified by:
fstatvfsin interfaceOs- Overrides:
fstatvfsin classForwardingOs- Throws:
ErrnoException
-
fsync
public void fsync(FileDescriptor fd) throws ErrnoException
- Specified by:
fsyncin interfaceOs- Overrides:
fsyncin classForwardingOs- Throws:
ErrnoException
-
ftruncate
public void ftruncate(FileDescriptor fd, long length) throws ErrnoException
- Specified by:
ftruncatein interfaceOs- Overrides:
ftruncatein classForwardingOs- Throws:
ErrnoException
-
lchown
public void lchown(String path, int uid, int gid) throws ErrnoException
- Specified by:
lchownin interfaceOs- Overrides:
lchownin classForwardingOs- Throws:
ErrnoException
-
link
public void link(String oldPath, String newPath) throws ErrnoException
- Specified by:
linkin interfaceOs- Overrides:
linkin classForwardingOs- Throws:
ErrnoException
-
lseek
public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException
- Specified by:
lseekin interfaceOs- Overrides:
lseekin classForwardingOs- Throws:
ErrnoException
-
lstat
public StructStat lstat(String path) throws ErrnoException
- Specified by:
lstatin interfaceOs- Overrides:
lstatin classForwardingOs- Throws:
ErrnoException
-
mkdir
public void mkdir(String path, int mode) throws ErrnoException
- Specified by:
mkdirin interfaceOs- Overrides:
mkdirin classForwardingOs- Throws:
ErrnoException
-
mkfifo
public void mkfifo(String path, int mode) throws ErrnoException
- Specified by:
mkfifoin interfaceOs- Overrides:
mkfifoin classForwardingOs- Throws:
ErrnoException
-
open
public FileDescriptor open(String path, int flags, int mode) throws ErrnoException
- Specified by:
openin interfaceOs- Overrides:
openin classForwardingOs- Throws:
ErrnoException
-
poll
public int poll(StructPollfd[] fds, int timeoutMs) throws ErrnoException
- Specified by:
pollin interfaceOs- Overrides:
pollin classForwardingOs- Throws:
ErrnoException
-
posix_fallocate
public void posix_fallocate(FileDescriptor fd, long offset, long length) throws ErrnoException
- Specified by:
posix_fallocatein interfaceOs- Overrides:
posix_fallocatein classForwardingOs- Throws:
ErrnoException
-
pread
public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException
- Specified by:
preadin interfaceOs- Overrides:
preadin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
pread
public int pread(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException
- Specified by:
preadin interfaceOs- Overrides:
preadin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
pwrite
public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException
- Specified by:
pwritein interfaceOs- Overrides:
pwritein classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
pwrite
public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException
- Specified by:
pwritein interfaceOs- Overrides:
pwritein classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
read
public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException
- Specified by:
readin interfaceOs- Overrides:
readin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
read
public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException
- Specified by:
readin interfaceOs- Overrides:
readin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
readlink
public String readlink(String path) throws ErrnoException
- Specified by:
readlinkin interfaceOs- Overrides:
readlinkin classForwardingOs- Throws:
ErrnoException
-
readv
public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException
- Specified by:
readvin interfaceOs- Overrides:
readvin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
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
-
remove
public void remove(String path) throws ErrnoException
- Specified by:
removein interfaceOs- Overrides:
removein classForwardingOs- Throws:
ErrnoException
-
rename
public void rename(String oldPath, String newPath) throws ErrnoException
- Specified by:
renamein interfaceOs- Overrides:
renamein classForwardingOs- Throws:
ErrnoException
-
sendfile
public long sendfile(FileDescriptor outFd, FileDescriptor inFd, MutableLong inOffset, long byteCount) throws ErrnoException
- Specified by:
sendfilein interfaceOs- Overrides:
sendfilein classForwardingOs- Throws:
ErrnoException
-
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
public FileDescriptor socket(int domain, int type, int protocol) throws ErrnoException
- 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
-
stat
public StructStat stat(String path) throws ErrnoException
- Specified by:
statin interfaceOs- Overrides:
statin classForwardingOs- Throws:
ErrnoException
-
statvfs
public StructStatVfs statvfs(String path) throws ErrnoException
- Specified by:
statvfsin interfaceOs- Overrides:
statvfsin classForwardingOs- Throws:
ErrnoException
-
symlink
public void symlink(String oldPath, String newPath) throws ErrnoException
- Specified by:
symlinkin interfaceOs- Overrides:
symlinkin classForwardingOs- Throws:
ErrnoException
-
write
public int write(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException
- Specified by:
writein interfaceOs- Overrides:
writein classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
write
public int write(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException
- Specified by:
writein interfaceOs- Overrides:
writein classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
writev
public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException
- Specified by:
writevin interfaceOs- Overrides:
writevin classForwardingOs- Throws:
ErrnoExceptionInterruptedIOException
-
-