code: @Override
      public void close(final String subPath)
          throws ExecutionTargetCloseException
      {
          StringBuilder sb = new StringBuilder();
  
          if (algorithms.size() != 1)
              throw new ExecutionTargetCloseException("Must use only one type of hash");
  
          // shasum entires are traditionally written in sorted order (per globing argument)
          @SuppressWarnings("unchecked")
          Map.Entry<ChecksumFile, Map<String, String>>[] entries = filesHashcodes.entrySet().toArray((Map.Entry<ChecksumFile, Map<String, String>>[]) new Map.Entry[0] );
          Arrays.sort(entries, new Comparator<Map.Entry<ChecksumFile, Map<String, String>>>() {
              @Override
              public int compare(Map.Entry<ChecksumFile, Map<String, String>> o1, Map.Entry<ChecksumFile, Map<String, String>> o2) {
                  ChecksumFile f1 = o1.getKey();
                  ChecksumFile f2 = o2.getKey();
                  return f1.getRelativePath(f1, subPath).compareTo(f2.getRelativePath(f2, subPath));
              }
          });
  
          // Write a line for each file.
          for ( Map.Entry<ChecksumFile, Map<String, String>> entry : entries )
          {
              ChecksumFile file = entry.getKey();
              Map<String, String> fileHashcodes = entry.getValue();
              for ( String algorithm : algorithms )
              {
                  if ( fileHashcodes.containsKey( algorithm ) )
                  {
                      sb.append( fileHashcodes.get( algorithm ) );
                  }
              }
              sb.append(SHASUM_FIELD_SEPARATOR)
                      .append( file.getRelativePath(entry.getKey(), subPath))
                      .append( LINE_SEPARATOR );
          }
  
          // Make sure the parent directory exists.
          FileUtils.mkdir( summaryFile.getParent() );
  
          // Write the result to the summary file.
          try
          {
              FileUtils.fileWrite( summaryFile.getPath(), "US-ASCII", sb.toString() );
               for (ArtifactListener artifactListener : artifactListeners) {
                  artifactListener.artifactCreated(summaryFile, "sum", null, null);
              }
         }
          catch ( IOException e )
          {
              throw new ExecutionTargetCloseException( e.getMessage() );
          }
      }
docs: {@inheritDoc}