Skip to content

Instantly share code, notes, and snippets.

@sasajib
Created September 12, 2014 18:34
Show Gist options
  • Save sasajib/59893ebbe466acd19da6 to your computer and use it in GitHub Desktop.
Save sasajib/59893ebbe466acd19da6 to your computer and use it in GitHub Desktop.
public static void loadServiceDetails(URI serviceConfigFilesLocation)
{
File[] serviceFiles = new File(serviceConfigFilesLocation).listFiles(
new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.toLowerCase().endsWith(".xml");
}
}
);
for (File file : serviceFiles) {
Path filePath = Paths.get(file.getAbsolutePath());
String fileString = new String(Files.readAllBytes(filePath), StandardCharsets.UTF_8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment