@Test public void testSplitRanges() { try { new ByteUtil.Range(-1, 1); fail("Should have failed with start < 0"); } catch (IllegalArgumentException expected) { } try { new ByteUtil.Range(2, 1); fail("Should have failed with end < start"); } catch (IllegalArgumentException expected) { } List<ByteUtil.Range> ranges1 = ByteUtil.splitRanges(source1, sep1); assertEquals("source1 should have 3 segments", 3, ranges1.size()); assertEquals(0, ranges1.get(0).start()); assertEquals(3, ranges1.get(0).length()); assertEquals(4, ranges1.get(1).start()); assertEquals(3, ranges1.get(1).length()); assertEquals(8, ranges1.get(2).start()); assertEquals(3, ranges1.get(2).length()); List<ByteUtil.Range> ranges4 = ByteUtil.splitRanges(source4, sep4); assertEquals("source4 should be a single segment", 1, ranges4.size()); assertEquals(0, ranges4.get(0).start()); assertEquals(source4.length, ranges4.get(0).length()); List<ByteUtil.Range> ranges5 = ByteUtil.splitRanges(source5, sep5); assertEquals(3, ranges5.size()); assertEquals(0, ranges5.get(0).start()); assertEquals(3, ranges5.get(0).end()); assertEquals(4, ranges5.get(1).start()); assertEquals(4, ranges5.get(1).end()); assertEquals(5, ranges5.get(2).start()); assertEquals(8, ranges5.get(2).end()); }
public static List<Range> splitRanges(byte[] source, byte[] separator) { return splitRanges(source, separator, -1); }
ByteUtil { public static List<Range> splitRanges(byte[] source, byte[] separator) { return splitRanges(source, separator, -1); } }
ByteUtil { public static List<Range> splitRanges(byte[] source, byte[] separator) { return splitRanges(source, separator, -1); }  }
ByteUtil { public static List<Range> splitRanges(byte[] source, byte[] separator) { return splitRanges(source, separator, -1); }  static byte[][] split(byte[] source, byte[] separator); static byte[][] split(byte[] source, byte[] separator, int limit); static List<Range> splitRanges(byte[] source, byte[] separator); static List<Range> splitRanges(byte[] source, byte[] separator, int limit); static byte[] join(byte[] separator, byte[]... components); static int indexOf(byte[] array, byte[] target, int fromIndex); static byte[] safeCopy(byte[] source, int offset, int length); static long getValueAsLong(final byte[] key,
      final Map<byte[], byte[]> taskValues); static String getValueAsString(final byte[] key,
      final Map<byte[], byte[]> taskValues); static double getValueAsDouble(byte[] key,
      NavigableMap<byte[], byte[]> infoValues); static int getValueAsInt(byte[] key, Map<byte[], byte[]> infoValues); }
ByteUtil { public static List<Range> splitRanges(byte[] source, byte[] separator) { return splitRanges(source, separator, -1); }  static byte[][] split(byte[] source, byte[] separator); static byte[][] split(byte[] source, byte[] separator, int limit); static List<Range> splitRanges(byte[] source, byte[] separator); static List<Range> splitRanges(byte[] source, byte[] separator, int limit); static byte[] join(byte[] separator, byte[]... components); static int indexOf(byte[] array, byte[] target, int fromIndex); static byte[] safeCopy(byte[] source, int offset, int length); static long getValueAsLong(final byte[] key,
      final Map<byte[], byte[]> taskValues); static String getValueAsString(final byte[] key,
      final Map<byte[], byte[]> taskValues); static double getValueAsDouble(byte[] key,
      NavigableMap<byte[], byte[]> infoValues); static int getValueAsInt(byte[] key, Map<byte[], byte[]> infoValues);  }