@Test(dataProvider = "extents") public void testExtentTokenRegex( String extentDescription, int expectedNumberOfFields, String expectedSize, String expectedFilename) throws Exception { List<String> extentFields = VmdkMetadata.extractExtentFields(extentDescription); assertThat(extentFields.size(), is(expectedNumberOfFields)); assertThat(extentFields.get(1), is(expectedSize)); assertThat(extentFields.get(3), is(expectedFilename)); }
public static List<String> extractExtentFields(String extentDescription) { List<String> extentFields = new ArrayList<String>(); Matcher m = EXTENT_TOKEN_PATTERN.matcher(extentDescription); while (m.find()) { extentFields.add(m.group(1).replace("\"", "")); } return extentFields; }
VmdkMetadata { public static List<String> extractExtentFields(String extentDescription) { List<String> extentFields = new ArrayList<String>(); Matcher m = EXTENT_TOKEN_PATTERN.matcher(extentDescription); while (m.find()) { extentFields.add(m.group(1).replace("\"", "")); } return extentFields; } }
VmdkMetadata { public static List<String> extractExtentFields(String extentDescription) { List<String> extentFields = new ArrayList<String>(); Matcher m = EXTENT_TOKEN_PATTERN.matcher(extentDescription); while (m.find()) { extentFields.add(m.group(1).replace("\"", "")); } return extentFields; }  }
VmdkMetadata { public static List<String> extractExtentFields(String extentDescription) { List<String> extentFields = new ArrayList<String>(); Matcher m = EXTENT_TOKEN_PATTERN.matcher(extentDescription); while (m.find()) { extentFields.add(m.group(1).replace("\"", "")); } return extentFields; }  static int getSingleExtentSize(InputStream inputStream); static List<String> extractExtentFields(String extentDescription); }
VmdkMetadata { public static List<String> extractExtentFields(String extentDescription) { List<String> extentFields = new ArrayList<String>(); Matcher m = EXTENT_TOKEN_PATTERN.matcher(extentDescription); while (m.find()) { extentFields.add(m.group(1).replace("\"", "")); } return extentFields; }  static int getSingleExtentSize(InputStream inputStream); static List<String> extractExtentFields(String extentDescription);  }