org.das2.util.OsUtil
Utility methods for operating system functions.
OsUtil( )
closeQuietly
closeQuietly( java.io.InputStream input ) → void
Unconditionally close an Reader
.
Equivalent to {@link Reader#close()}, except any exceptions will be ignored.
This is typically used in finally blocks.
From apache commons. http://grepcode.com/file_/repo1.maven.org/maven2/commons-io/commons-io/1.2/org/apache/commons/io/IOUtils.java/?v=source
Parameters
input - the Reader to close, may be null or already closed
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
contentEquals
contentEquals( java.io.InputStream input1, java.io.InputStream input2 ) → boolean
Compare the contents of two Streams to determine if they are equal or
not.
This method buffers the input internally using
BufferedInputStream
if they are not already buffered.
Parameters
input1 - the first stream
input2 - the second stream
Returns:
true if the content of the streams are equal or they both don't
exist, false otherwise
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
contentEquals( java.io.File file1, java.io.File file2 ) → boolean
getProcessId
getProcessId( String fallback ) → String
return the processID (pid), or the fallback if the pid cannot be found.
Parameters
fallback - the string (null is okay) to return when the pid cannot be found.
Returns:
the process id or the fallback provided by the caller.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]