当前位置: 首页>>代码示例>>Java>>正文


Java OnLineListener.onLine方法代码示例

本文整理汇总了Java中eu.chainfire.libsuperuser.StreamGobbler.OnLineListener.onLine方法的典型用法代码示例。如果您正苦于以下问题:Java OnLineListener.onLine方法的具体用法?Java OnLineListener.onLine怎么用?Java OnLineListener.onLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eu.chainfire.libsuperuser.StreamGobbler.OnLineListener的用法示例。


在下文中一共展示了OnLineListener.onLine方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processLine

import eu.chainfire.libsuperuser.StreamGobbler.OnLineListener; //导入方法依赖的package包/类
/**
 * Process a normal STDOUT/STDERR line
 * 
 * @param line Line to process
 * @param listener Callback to call or null
 */
private synchronized void processLine(String line, OnLineListener listener) {
    if (listener != null) {
        if (handler != null) {
            final String fLine = line;
            final OnLineListener fListener = listener;

            startCallback();
            handler.post(new Runnable() {
                @Override
                public void run() {
                    try {
                        fListener.onLine(fLine);
                    } finally {
                        endCallback();
                    }
                }
            });
        } else {
            listener.onLine(line);
        }
    }
}
 
开发者ID:staf621,项目名称:ki4a,代码行数:29,代码来源:Shell.java

示例2: processLine

import eu.chainfire.libsuperuser.StreamGobbler.OnLineListener; //导入方法依赖的package包/类
/**
 * Process a normal STDOUT/STDERR line
 *
 * @param line     Line to process
 * @param listener Callback to call or null
 */
private synchronized void processLine(String line, OnLineListener listener) {
    if (listener != null) {
        if (handler != null) {
            final String fLine = line;
            final OnLineListener fListener = listener;

            startCallback();
            handler.post(new Runnable() {
                @Override
                public void run() {
                    try {
                        fListener.onLine(fLine);
                    } finally {
                        endCallback();
                    }
                }
            });
        } else {
            listener.onLine(line);
        }
    }
}
 
开发者ID:cumtsmart,项目名称:MostTool,代码行数:29,代码来源:Shell.java

示例3: processLine

import eu.chainfire.libsuperuser.StreamGobbler.OnLineListener; //导入方法依赖的package包/类
/**
 * Process a normal STDOUT/STDERR line
 * 
 * @param line Line to process
 * @param listener Callback to call or null
 */
private synchronized void processLine(String line, OnLineListener listener) {
	if (listener != null) {
		if (handler != null) {
			final String fLine = line;
			final OnLineListener fListener = listener;
			
			startCallback();
			handler.post(new Runnable() {								
				@Override
				public void run() {
					try {
						fListener.onLine(fLine);
					} finally {
						endCallback();
					}
				}
			});
		} else {
			listener.onLine(line);
		}
	}			
}
 
开发者ID:TheZ3ro,项目名称:WiFiPV,代码行数:29,代码来源:Shell.java

示例4: processLine

import eu.chainfire.libsuperuser.StreamGobbler.OnLineListener; //导入方法依赖的package包/类
/**
 * Process a normal STDOUT/STDERR line
 * 
 * @param line Line to process
 * @param listener Callback to call or null
 */
private synchronized void processLine(String line, OnLineListener listener) {
    if (listener != null) {
        if (handler != null) {
            final String fLine = line;
            final OnLineListener fListener = listener;

            startCallback();
            handler.post(new Runnable() {								
                @Override
                public void run() {
                    try {
                        fListener.onLine(fLine);
                    } finally {
                        endCallback();
                    }
                }
            });
        } else {
            listener.onLine(line);
        }
    }			
}
 
开发者ID:Neraud,项目名称:PADListener,代码行数:29,代码来源:Shell.java

示例5: processLine

import eu.chainfire.libsuperuser.StreamGobbler.OnLineListener; //导入方法依赖的package包/类
/**
 * Process a normal STDOUT/STDERR line
 *
 * @param line Line to process
 * @param listener Callback to call or null
 */
private synchronized void processLine(String line, OnLineListener listener) {
    if (listener != null) {
        if (handler != null) {
            final String fLine = line;
            final OnLineListener fListener = listener;

            startCallback();
            handler.post(new Runnable() {
                @Override
                public void run() {
                    try {
                        fListener.onLine(fLine);
                    } finally {
                        endCallback();
                    }
                }
            });
        } else {
            listener.onLine(line);
        }
    }
}
 
开发者ID:omerjerk,项目名称:RemoteDroid,代码行数:29,代码来源:Shell.java


注:本文中的eu.chainfire.libsuperuser.StreamGobbler.OnLineListener.onLine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。