code: private static byte[] reverseCopy(byte[] quality) {
          byte[] newData = new byte[quality.length];
          int reverseposition = quality.length - 1;
          for (int position = 0; position < quality.length; ++position, --reverseposition)
              //reverseposition = quality.length - 1 - position;
              newData[position] = quality[reverseposition];
  
          assert reverseposition == -1;
  
          return newData;
      }
docs: Helper method.