Package com.dtolabs.rundeck.core.utils
Class Utility
- java.lang.Object
-
- com.dtolabs.rundeck.core.utils.Utility
-
public class Utility extends java.lang.Object
Utility java code
-
-
Constructor Summary
Constructors Constructor Description Utility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
seekBack(java.io.File f, int count, java.lang.String marker)
seekBack searches backwards for certain markers in a file, and returns position of the final marker found.static long
seekBack(java.io.File f, int count, java.lang.String marker, com.google.common.base.Predicate<java.io.InputStream> validity)
seekBack searches backwards for certain markers in a file, and returns position of the final marker found.
-
-
-
Method Detail
-
seekBack
public static long seekBack(java.io.File f, int count, java.lang.String marker) throws java.io.IOException
seekBack searches backwards for certain markers in a file, and returns position of the final marker found. count specifies how many markers to search for. if the search reaches the beginning of the file without finding all of the markers, then 0 is returned.- Parameters:
f
- the file to searchcount
- number of markers to findmarker
- text string marker- Returns:
- location of marker number count found from the end of the file, or 0
- Throws:
java.io.IOException
-
seekBack
public static long seekBack(java.io.File f, int count, java.lang.String marker, com.google.common.base.Predicate<java.io.InputStream> validity) throws java.io.IOException
seekBack searches backwards for certain markers in a file, and returns position of the final marker found. count specifies how many markers to search for. if the search reaches the beginning of the file without finding all of the markers, then 0 is returned.- Parameters:
f
- the file to searchcount
- number of markers to findmarker
- text string markervalidity
- predicate to test whether the stream is at a valid position, or null- Returns:
- location of marker number count found from the end of the file, or 0
- Throws:
java.io.IOException
-
-