Java Byte Array Compare memcmp(List header, String string, int size)

Here you can find the source of memcmp(List header, String string, int size)

Description

memcmp

License

Open Source License

Declaration

static int memcmp(List<Byte> header, String string, int size) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    static int memcmp(List<Byte> header, String string, int size) {
        for (int i = 0; i < size; i++) {
            if (header.get(i) != (byte) string.charAt(i))
                return 1;
        }// ww w.java  2  s .  c om

        return 0;
    }
}

Related

  1. memcmp(byte[] a, int aoff, int alen, byte[] b, int boff, int blen)
  2. memcmp(byte[] bytes, byte[] bytes2, int nbElem)
  3. memcmp(byte[] s1, int s1Size, int s1offset, byte[] s2, int s2Size, int s2offset)
  4. memcmp(final byte[] a, final byte[] b, int length)
  5. memcmp(final byte[] first, final int firstStart, final byte[] second, final int secondStart, int size)