class BytesUtils {

  public static byte[] subBytes(byte[] src, int start, int length) {
    if ((start + length) > src.length) {
      return null;
    }
    if (length <= 0) {
      return null;
    }
    byte[] result = new byte[length];
    for (int i = 0; i < length; i++) {
      result[i] = src[start + i];
    }
    return result;
  }

  private  BytesUtils();

}