| java.lang.Object edu.indiana.lib.twinpeaks.util.ByteUtils
ByteUtils | public class ByteUtils (Code) | | Byte utilities
|
Method Summary | |
public static boolean | equals(byte[] source, byte[] match) | public static void | getBytes(byte[] source, int srcBegin, int srcEnd, byte[] destination, int dstBegin) | public static int | indexOf(byte[] source, String matchString) | public static int | indexOf(byte[] source, byte[] match) | public static int | lastIndexOf(byte[] source, String matchString) | public static int | lastIndexOf(byte[] source, byte[] match) | public static void | main(String[] args) | public static boolean | startsWith(byte[] source, byte[] match) | public static boolean | startsWith(byte[] source, int offset, byte[] match) | public static byte[] | subbytes(byte[] source, int srcBegin, int srcEnd) | public static byte[] | subbytes(byte[] source, int srcBegin) |
equals | public static boolean equals(byte[] source, byte[] match)(Code) | | Does the source array equal the match array?
Parameters: source - Byte array to examine Parameters: offset - An offset into the source array Parameters: match - Byte array to locate in source true If the two arrays are equal |
getBytes | public static void getBytes(byte[] source, int srcBegin, int srcEnd, byte[] destination, int dstBegin)(Code) | | Copies bytes from the source byte array to the destination array
Parameters: source - The source array Parameters: srcBegin - Index of the first source byte to copy Parameters: srcEnd - Index after the last source byte to copy Parameters: destination - The destination array Parameters: dstBegin - The starting offset in the destination array |
indexOf | public static int indexOf(byte[] source, String matchString)(Code) | | Returns the index in the source array where the first occurrence
of the specified text (a String, converted to a byte array) is found
Parameters: source - Byte array to examine Parameters: matchString - String to locate in source Index of the first matching character (-1 if no match) |
indexOf | public static int indexOf(byte[] source, byte[] match)(Code) | | Returns the index in the source array where the first occurrence
of the specified byte pattern is found
Parameters: source - Byte array to examine Parameters: match - Byte array to locate in source Index of the first matching character (-1 if no match) |
lastIndexOf | public static int lastIndexOf(byte[] source, String matchString)(Code) | | Returns the index in the source array where the last occurrence
of the specified text (a String, converted to a byte array) is found
Parameters: source - Byte array to examine Parameters: matchString - String to locate in source Index of the first matching character (-1 if no match) |
lastIndexOf | public static int lastIndexOf(byte[] source, byte[] match)(Code) | | Returns the index in the source array where the last occurrence
of the specified byte pattern is found
Parameters: source - Byte array to examine Parameters: match - Byte array to locate in source Index of the last matching character (-1 if no match) |
startsWith | public static boolean startsWith(byte[] source, byte[] match)(Code) | | Does this byte array begin with match array content?
Parameters: source - Byte array to examine Parameters: match - Byte array to locate in source true If the starting bytes are equal |
startsWith | public static boolean startsWith(byte[] source, int offset, byte[] match)(Code) | | Does this byte array begin with match array content?
Parameters: source - Byte array to examine Parameters: offset - An offset into the source array Parameters: match - Byte array to locate in source true If the starting bytes are equal |
subbytes | public static byte[] subbytes(byte[] source, int srcBegin, int srcEnd)(Code) | | Return a new byte array containing a sub-portion of the source array
Parameters: srcBegin - The beginning index (inclusive) Parameters: srcEnd - The ending index (exclusive) The new, populated byte array |
subbytes | public static byte[] subbytes(byte[] source, int srcBegin)(Code) | | Return a new byte array containing a sub-portion of the source array
Parameters: srcBegin - The beginning index (inclusive) The new, populated byte array |
|
|