code: private static String toSingleLoopLineMmCifString(Object record, Field[] fields, int[] sizes) {
  
  		StringBuilder str = new StringBuilder();
  
  		Class<?> c = record.getClass();
  
  		if(fields == null)
  			fields = getFields(c);
  
  		if (sizes.length!=fields.length)
  			throw new IllegalArgumentException("The given sizes of fields differ from the number of declared fields");
  
  		int i = -1;
  		for (Field f : fields) {
  			i++;
  			f.setAccessible(true);
  
  			try {
  				Object obj = f.get(record);
  				String val;
  				if (obj==null) {
  					logger.debug("Field {} is null, will write it out as {}",f.getName(),MMCIF_MISSING_VALUE);
  					val = MMCIF_MISSING_VALUE;
  				} else {
  					val = (String) obj;
  				}
  
  				str.append(String.format("%-"+sizes[i]+"s ", addMmCifQuoting(val)));
  
  
  			} catch (IllegalAccessException e) {
  				logger.warn("Field {} is inaccessible", f.getName());
  				continue;
  			} catch (ClassCastException e) {
  				logger.warn("Could not cast value to String for field {}",f.getName());
  				continue;
  			}
  		}
  
  		str.append(newline);
  
  		return str.toString();
  
  	}
docs: Given a mmCIF bean produces a String representing it in mmCIF loop format as a single record line
  @param record
  @param fields Set of fields for the record. If null, will be calculated from the class of the record
  @param sizes the size of each of the fields
  @return