private void bindBandsToFiles(Document dom) {
   bandDataFiles = DimapProductHelpers.getBandDataFiles(dom, product, getInputDir());
   final Band[] bands = product.getBands();
   for (final Band band : bands) {
     if (band instanceof VirtualBand || band instanceof FilterBand) {
       continue;
     }
     final File dataFile = bandDataFiles.get(band);
     if (dataFile == null || !dataFile.canRead()) {
       SystemUtils.LOG.warning(
           "DimapProductReader: Unable to read file '"
               + dataFile
               + "' referenced by '"
               + band.getName()
               + "'.");
       SystemUtils.LOG.warning(
           "DimapProductReader: Removed band '"
               + band.getName()
               + "' from product '"
               + product.getFileLocation()
               + "'.");
     }
   }
 }
 private static boolean loadHdf5Lib() {
   try {
     Class.forName(H5_CLASS_NAME);
     return true;
   } catch (ClassNotFoundException ignored) {
     // no logging here, H5 class may not be provided by intention
     return false;
   } catch (LinkageError e) {
     // warning here, because H5 class exists, but native libs couldn't be loaded
     SystemUtils.LOG.warning(
         MessageFormat.format(
             "{0}: HDF-5 library not available: {1}: {2}",
             Hdf5ProductWriterPlugIn.class, e.getClass(), e.getMessage()));
     return false;
   }
 }
 public static S2GranuleDirFilename create(String fileName) {
   final Matcher matcher = PATTERN.matcher(fileName);
   if (matcher.matches()) {
     return new S2L1BGranuleDirFilename(
         fileName,
         matcher.group(1),
         matcher.group(2),
         matcher.group(3),
         matcher.group(4),
         matcher.group(5),
         matcher.group(6),
         matcher.group(7),
         matcher.group(8),
         matcher.group(9));
   } else {
     SystemUtils.LOG.warning(
         String.format(
             "%s S2L1BGranuleDirFilename didn't match regexp %s", fileName, PATTERN.toString()));
     return null;
   }
 }