Package org.robolectric.shadows
Class ShadowOs
java.lang.Object
org.robolectric.shadows.ShadowOs
A Shadow for android.system.Os
-
Method Summary
Modifier and TypeMethodDescriptionprotected static long
lseek
(FileDescriptor fd, long offset, int whence) Shadow implementation ofOs.lseek(FileDescriptor, long, int)
.static void
setSysconfValue
(int name, long value) Configures values to be returned by sysconf.protected static long
sysconf
(int name) Returns the value configured via setSysconfValue, or -1 if one hasn't been configured.
-
Method Details
-
setSysconfValue
public static void setSysconfValue(int name, long value) Configures values to be returned by sysconf. -
sysconf
Returns the value configured via setSysconfValue, or -1 if one hasn't been configured. -
lseek
@Implementation protected static long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException Shadow implementation ofOs.lseek(FileDescriptor, long, int)
.This method overrides the original lseek method to handle the SEEK_SET and SEEK_CUR with the offset cache.
- Throws:
ErrnoException
-