The list of methods to do Array Starts With are organized into topic(s).
boolean
startsWith(byte a[], int from, byte b[]) starts With
final int nb = b.length;
for (int i = 0; i < nb; i++) {
final int j = from + i;
if (j >= a.length || a[j] != b[i])
return false;
return true;
boolean
startsWith(byte[] array, byte[] prefix) Utility method to check if one byte array starts with a specified sequence of bytes.
if (array == prefix) {
return true;
if (array == null || prefix == null) {
return false;
int prefixLength = prefix.length;
if (prefix.length > array.length) {
...
boolean
startsWith(byte[] array, byte[] startBytes) Determines whether the specified byte array starts with the specific bytes.
if (array == null || startBytes == null || array.length < startBytes.length) {
return false;
for (int i = 0; i < startBytes.length; i++) {
if (array[i] != startBytes[i]) {
return false;
return true;
boolean
startsWith(byte[] bytes, int offset, byte... prefix) starts With
if (length(bytes) == 0 || length(prefix) == 0 || prefix.length > bytes.length || offset < 0
|| offset + prefix.length > bytes.length) {
return false;
for (int i = 0; i < prefix.length; i++) {
if (prefix[i] != bytes[i + offset]) {
return false;
return true;
boolean
startsWith(byte[] bytes, String text) starts With
char[] chars = text.toCharArray();
if (chars.length > bytes.length) {
return false;
} else {
for (int i = 0; i < chars.length; i++) {
if (bytes[i] != chars[i]) {
return false;
return true;
boolean
startsWith(byte[] checkMe, byte[] maybePrefix) starts With
int cm_len = checkMe.length;
int mp_len = maybePrefix.length;
if (cm_len < mp_len)
return false;
for (int i = 0; i < mp_len; ++i)
if (checkMe[i] != maybePrefix[i])
return false;
return true;
...