public static ChangeRecord valueOfLDIFChangeRecord(final String... ldifLines){
  try (final LDIFChangeRecordReader reader=new LDIFChangeRecordReader(ldifLines)){
    if (!reader.hasNext()) {
      final LocalizableMessage message=WARN_READ_LDIF_RECORD_NO_CHANGE_RECORD_FOUND.get();
      throw new LocalizedIllegalArgumentException(message);
    }
    final ChangeRecord record=reader.readChangeRecord();
    if (reader.hasNext()) {
      final LocalizableMessage message=WARN_READ_LDIF_RECORD_MULTIPLE_CHANGE_RECORDS_FOUND.get();
      throw new LocalizedIllegalArgumentException(message);
    }
    return record;
  }
 catch (  final DecodeException e) {
    throw new LocalizedIllegalArgumentException(e.getMessageObject());
  }
catch (  final IOException e) {
    final LocalizableMessage message=WARN_READ_LDIF_RECORD_UNEXPECTED_IO_ERROR.get(e.getMessage());
    throw new LocalizedIllegalArgumentException(message);
  }
}

public static ChangeRecord valueOfLDIFChangeRecord ( final String ... ldifLines ) { try ( final LDIFChangeRecordReader reader = new LDIFChangeRecordReader ( ldifLines ) ) { if ( ! reader . hasNext ( ) ) { final LocalizableMessage message = WARN_READ_LDIF_RECORD_NO_CHANGE_RECORD_FOUND . get ( ) ; throw new LocalizedIllegalArgumentException ( message ) ; } final ChangeRecord record = reader . readChangeRecord ( ) ; if ( reader . hasNext ( ) ) { final LocalizableMessage message = WARN_READ_LDIF_RECORD_MULTIPLE_CHANGE_RECORDS_FOUND . get ( ) ; throw new LocalizedIllegalArgumentException ( message ) ; } return record ; } catch ( final DecodeException e ) { throw new LocalizedIllegalArgumentException ( e . getMessageObject ( ) ) ; } catch ( final IOException e ) { final LocalizableMessage message = WARN_READ_LDIF_RECORD_UNEXPECTED_IO_ERROR . get ( e . getMessage ( ) ) ; throw new LocalizedIllegalArgumentException ( message ) ; } }
parses the provided array of ldif lines as a single ldif change record .
