Here you can find the source of startsWithGaps(final byte[] aFrag, final int numStartGaps)
public static boolean startsWithGaps(final byte[] aFrag, final int numStartGaps)
//package com.java2s; /*// w ww . j av a 2 s. c o m * Copyright (c) 2007-2013 David Soergel <dev@davidsoergel.com> * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ public class Main { public static boolean startsWithGaps(final byte[] aFrag, final int numStartGaps) { for (int i = 0; i < numStartGaps; i++) { // if the fragment is shorter than the window but contains only gaps, return true if (i >= aFrag.length) { return true; } if (!isGap(aFrag[i])) { return false; } } return true; } public static boolean isGap(byte x)//, String gapChars) { return x == '-' || x == '.' || x == ' '; // return gapChars.indexOf((char) x) != -1; } }