org.arakhne.vmutil
Class AbstractOperatingSystemWrapper
java.lang.Object
org.arakhne.vmutil.AbstractOperatingSystemWrapper
- All Implemented Interfaces:
- OperatingSystemWrapper
- Direct Known Subclasses:
- OperatingSystemDiskUtilWrapper, OperatingSystemUDevWrapper
abstract class AbstractOperatingSystemWrapper
- extends Object
- implements OperatingSystemWrapper
Wrapper to the OS dependent functions.
This class was introduced to avoid to kill the current
JVM even if the native functions are unloadable.
In this way, on operating system without the support
for the native libs is still able to be run.
- Since:
- 6.3
- Version:
- 6.3 (rev:285) 2011-10-14 12:02:41
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc
- Maven Artifact Id:
- arakhneVmutils
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractOperatingSystemWrapper
public AbstractOperatingSystemWrapper()
runCommand
protected String runCommand(String... command)
- Run a shell command.
- Parameters:
command - is the sheel command.
- Returns:
- the standard output
grep
protected String grep(String selector,
String text)
- Replies the first line that contains the given selector.
- Parameters:
selector - is the string to search for.text - is the text to search in.
- Returns:
- the found line or
null.
cut
protected String cut(String delimiter,
int column,
String lineText)
- Cut the line in columns and replies the given column.
- Parameters:
delimiter - is the delmiter to use to cut.column - is the number of the column to reply.lineText - is the line to cut.
- Returns:
- the column or
null.
Copyright © 2006-2011 Arakhnê.org Consortium. All rights reserved under LGPL license terms.