public static int findByte(byte [] utf, int start, int end, byte b) {
    for(int i=start; i<end; i++) {
      if (utf[i]==b) {
        return i;
      }
    }
    return -1;      
  }
@Test
  public void testFindByte() {
    byte[] data = "Hello, world!".getBytes();
    assertEquals("Character 'a' does not exist in string", -1,
        UTF8ByteArrayUtils.findByte(data, 0, data.length, (byte) 'a'));
    assertEquals("Did not find first occurrence of character 'o'", 4,
        UTF8ByteArrayUtils.findByte(data, 0, data.length, (byte) 'o'));
  }