{
LdifContainer container = enumeration.next();
if ( container instanceof LdifContentRecord )
{
LdifContentRecord record = ( LdifContentRecord ) container;
LdifDnLine dnLine = record.getDnLine();
LdifAttrValLine[] attrValLines = record.getAttrVals();
LdifSepLine sepLine = record.getSepLine();
// sort and format
DummyEntry entry = ModelConverter.ldifContentRecordToEntry( record, browserConnection );
AttributeComparator comparator = new AttributeComparator( entry );
Arrays.sort( attrValLines, comparator );
LdifContentRecord newRecord = new LdifContentRecord( dnLine );
for ( int i = 0; i < attrValLines.length; i++ )
{
newRecord.addAttrVal( attrValLines[i] );
}
newRecord.finish( sepLine );
String s = newRecord.toFormattedString( ldifFormatParameters );
// String s = record.toFormattedString();
bufferedWriter.write( s );
count++;