@Override
 public Path resolve(Path path) {
   CodecInfo c = getCodecInfo();
   String suffix = c != null ? "." + c.getDefaultSuffix() : "";
   if (path != null) {
     return path.suffix(suffix);
   } else if (StringUtils.hasText(suffix)) {
     return new Path(suffix);
   } else {
     return path;
   }
 }
  @Override
  public Path init(Path path) {
    path = super.init(path);
    log.debug("Initialising from path=" + path);

    CodecInfo c = getCodecInfo();
    String suffix = c != null ? "." + c.getDefaultSuffix() : "";

    if (path != null && StringUtils.hasText(suffix)) {
      if (path.getName().startsWith(suffix)) {
        String name = path.getName().substring(suffix.length());
        if (StringUtils.hasText(name)) {
          path = new Path(path.getParent(), name);
          log.debug("Removed handled prefix, path is now " + path);
        } else {
          path = null;
          log.debug("Removed last handled name part, returning null");
        }
      }
    }
    return path;
  }