20 public static void gc();
79 public static long readFile(
long handle,
byte[] buffer,
long offset,
long length);
92 public static long writeFile(
long handle,
byte[] buffer,
long offset,
long length);
115 public static void sleep(
long milliSecond);
138 public static long consoleRead(
byte[] buffer,
long offset,
long length);
224 public static bool openPipe(
long pipe,
bool forRead);
240 public static long readPipe(
long pipe,
byte [] buffer,
long offset,
long length);
251 public static long writePipe(
long pipe,
byte [] buffer,
long offset,
long length);
418 public static long consoleReadMask(
byte[] buffer,
long offset,
long length,
char cMask);
446 public static const int STDIN_NO = 0;
477 public static const int ARCH_X86 = 1;
478 public static const int ARCH_X64 = 2;
479 public static const int ARCH_ARM = 3;
487 public static const int SIGINT = 1;
488 public static const int SIGTSTP = 2;
489 public static const int SIGCONT = 3;
490 public static const int SIGTERM = 4;
491 public static const int SIGPWR = 5;
501 public static const int S_IFMT = 00170000;
502 public static const int S_IFSOCK = 0140000;
503 public static const int S_IFLNK = 0120000;
504 public static const int S_IFREG = 0100000;
505 public static const int S_IFBLK = 0060000;
506 public static const int S_IFDIR = 0040000;
507 public static const int S_IFCHR = 0020000;
508 public static const int S_IFIFO = 0010000;
509 public static const int S_ISUID = 0004000;
510 public static const int S_ISGID = 0002000;
511 public static const int S_ISVTX = 0001000;
512 public static const int S_IRWXU = 00700;
513 public static const int S_IRUSR = 00400;
514 public static const int S_IWUSR = 00200;
515 public static const int S_IXUSR = 00100;
516 public static const int S_IRWXG = 00070;
517 public static const int S_IRGRP = 00040;
518 public static const int S_IWGRP = 00020;
519 public static const int S_IXGRP = 00010;
520 public static const int S_IRWXO = 00007;
521 public static const int S_IROTH = 00004;
522 public static const int S_IWOTH = 00002;
523 public static const int S_IXOTH = 00001;
static long consoleWrite(String text)
向控制台环境中写入文本
static long writePipe(long pipe, byte [] buffer, long offset, long length)
向管道中写入数据
static const int SIGINT
信号
static long writeFile(long handle, byte[] buffer,long offset, long length)
向文件中写入数据
static long consoleReadMask(byte[] buffer,long offset, long length, char cMask)
从控制台环境中读取数据并设置掩码
static int loadLibrary(String path)
加载slx动态库
static const int SIGNAL_DISCARD
static const int SIGNAL_ABORT
static void sleep(long milliSecond)
使线程进入休眠
static long createPipe(String name, bool forOpen)
创建一个管道
static const int LOG_LEV_CRIT
static const int ARCH_ARM
static const int LOG_LEV_EMERG
logcat 信息级别
static bool closePipe(long pipe)
关闭管道
static long consoleWriteError(String text)
向控制台STDERR流中写入文本
static bool installService(String apppath,String serviceName, String displayName, String description)
检查服务是否已安装
static const int PLATFORM_IOS
static bool deleteFile(String filepath)
删除一个本地文件
static bool fileExists(String filepath)
测试一个本地文件是否存在
static void gc()
手动垃圾回收,一般不建议使用
static const int SIGNAL_SPREAD
static bool disableIncrementalGC(bool disable)
禁用增量GC[注意此功能暂未开放]
static long getFileSize(String filepath)
获取一个文件的长度
static long getAppVersion()
获取App版本, 该版本由.version文件定义, 返回值为一个64位的long, 每两个字节为一个版本的值
static const int ARCH_X64
static long getAppTimestamp()
获取App组建时间 毫秒数
static bool uninstallService(String serviceName)
卸载服务
static int [] getAllModules()
获取所有已加载的slx动态库的id
static const int PLATFORM_IOS_SIMULATOR
static String getAppDirector()
获取程序所在文件夹
static bool isServiceInstalled(String serviceName)
检查服务是否已安装
static const int SIGNAL_UNINTERESTED
信号处理接口返回值
static const int ARCH_MIPS
static long consoleRead(byte[] buffer,long offset, long length)
从控制台环境中读取数据
static const int LOG_LEV_WARNING
static int getchar()
从控制台获取一个输入字符
static const int PLATFORM_POSIX
static bool chmod(String path, int mode)
改变文件权限
static const int PLATFORM_WINDOWS
static int getOSBit()
获取操作系统位数
static void createConsole()
创建控制台环境
static long readFile(long handle, byte[] buffer,long offset, long length)
读取文件数据
static void setObjectNonFinalize(Object object)
设置对象Finalize开关, 调用此函数以后 对象的finalize将被禁止
static bool openPipe(long pipe, bool forRead)
打开一个管道
static const int S_IFSOCK
static const int PLATFORM_UNIX
static const int STDIN_NO
标准输入输出流
static int getPlatformId()
获取平台操作系统ID 0 WINDOWS 1 LINUX 2 MAC OSX 3 iPhone 模拟器 4 iPhone 5 unix 6 其他poxis环境
static int getFileMode(String filepath)
获取文件属性
static String getAppPath()
获取程序的路径
static long fileLength(long handle)
获取一个已打开的文件的长度
static bool registrySystemSignalHandler(int signal, ISystemSignalHandler handler, bool add)
添加信号处理回调, 该方法可以添加多个信号处理接口,当有信号时按照添加的顺序进行调用,若前面的接口返回SIGNAL_ABORT 则后添加的接口得不到处理机会
static const int ARCH_MIPS64
static long currentTimeMillis()
获取当前毫秒数
static const int PLATFORM_LINUX
static int serviceRun()
服务主线程循环
static bool setupLogSource(String eventName)
设置日志事件源 windows下有效
static bool registryCrashHandler(ICrashHandler handle)
添加一个程序crash的回调接口, 当程序发生异常或者没有catch的Exception时 将调用此接口
static String getDefaultEncoding()
获取操作系统默认字符集
static const int STDOUT_NO
static bool mkdir(String path)
创建文件夹
static int getModuleId(String path)
获取已加载的slx动态库的id
static String getEnvironmentVariable(String name)
获取环境变量
static void stdflush(int stdno)
刷新控制台数据流
static String getModulePath(int id)
获取slx动态库的路径
static bool rename(String oldname, String newname)
重命名文件或者文件夹
static bool chdir(String path)
改变当前路径
static long readPipe(long pipe, byte [] buffer, long offset, long length)
从管道中读取数据
static String getWorkDirector()
获取程序当前工作目录
static const int PLATFORM_MACOSX
static const int ARCH_X86
static const int LOG_LEV_DEBUG
static String getHostName()
获取本机名称
static const int LOG_LEV_ERR
static void arrayCopy(Object[] src,long srcpos, Object[] dst,long dstpos, long length)
复制数组对象内容,要求类型匹配
static bool closeFile(long handle)
关闭一个已打开的文件
static bool setMinorGCThreshold(double fThreshold)
设置GC阈值
static const int ARCH_ARM64
static const int LOG_LEV_NOTICE
static const int ARCH_UNKNOW
处理器架构
static const int STDERR_NO
static bool setEnvironmentVariable(String name, String value, bool append, bool atFront)
设置环境变量
static const int PLATFORM_UNKNOW
操作系统
static int getArchId()
获取平台架构 1 X86 2 X86_64 3 ARM 4 ARM64 5 MIPS 6 MIPS64 7 UNKNOW
static bool rmdir(String path)
删除文件夹
static const int LOG_LEV_ALERT
static long openFile(String filepath,String mode)
打开文件