private int findSlashName(byte[] d,String name){
  int i;
  for (i=0; i < d.length; i++) {
    if (d[i] == '/') {
      boolean found=true;
      for (int j=0; j < name.length(); j++) {
        if (d[i + j + 1] != name.charAt(j)) {
          found=false;
          break;
        }
      }
      if (found) {
        return i;
      }
    }
  }
  return -1;
}

private int findSlashName ( byte [ ] d , String name ) { int i ; for ( i = 0 ; i < d . length ; i ++ ) { if ( d [ i ] == '/' ) { boolean found = true ; for ( int j = 0 ; j < name . length ( ) ; j ++ ) { if ( d [ i + j + 1 ] != name . charAt ( j ) ) { found = false ; break ; } } if ( found ) { return i ; } } } return - 1 ; }
get the index into the byte array of a slashed name , like " / name " .
