code: public static String formatSlices(List<DataSlice> slices, int max)
    {
      if (slices != null)
      {
        StringBuilder builder = new StringBuilder();
  
        if (slices.size() != 0)
        {
          int number = 1;
          int sliceCount = slices.size();
  
          for(DataSlice slice : slices)
          {
            builder.append("List<DataSlice>@");
            builder.append(Integer.toHexString(System.identityHashCode(slices)));
            builder.append(" Slice ");
            builder.append(number++);
            builder.append(" of ");
            builder.append(sliceCount);
  
            // OK, now get the slice added into the builder
            builder.append(" :" + ls + "  ");
            formatSliceToSB(builder, slice, max);
            builder.append(ls);
          }
        }
        else
        {
          builder.append("List<DataSlice>@");
          builder.append(Integer.toHexString(System.identityHashCode(slices)));
          builder.append(" has no slices");
        }
  
        return builder.toString();
      }
      else
      {
        return "List<DataSlice> is null";
      }
    }
docs: Produce a formatted view of a list of DataSlices.  Duplicate output lines are
  suppressed to save space.
  <p>
  @param slices The list of DataSlices to be formatted
  @return the formatted data slice
  @param max maximun number of bytes that should be formatted for each slice.