You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2014/02/14 12:21:34 UTC

svn commit: r1568240 [1/4] - in /jackrabbit/oak/trunk: oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ ...

Author: reschke
Date: Fri Feb 14 11:21:31 2014
New Revision: 1568240

URL: http://svn.apache.org/r1568240
Log:
fix svn:eol-style

Modified:
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalGroup.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentity.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityException.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityProvider.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityProviderManager.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityRef.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalUser.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncContext.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncException.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncHandler.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncManager.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncConfig.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalIDPManagerImpl.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModuleFactory.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/SyncManagerImpl.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalLoginModuleTest.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalLoginModuleTestBase.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/TestIdentityProvider.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/DebugTimer.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapGroup.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentity.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProvider.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapProviderConfig.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapSettings.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapUser.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/PoolableUnboundConnectionFactory.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/UnboundLdapConnectionPool.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginStandaloneTest.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginTestBase.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginWithRepoLoginTest.java   (props changed)
    jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java   (props changed)
    jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/StringSizeEstimator.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/RepositoryStatsMBean.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreRestore.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobStoreBuilder.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobStoreConfiguration.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobStoreHelper.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/GarbageCollectorFileState.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/MarkSweepGarbageCollector.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/cloud/CloudBlobStore.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/cloud/CloudBlobStoreBuilder.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStore.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStoreBuilder.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreWrapperBackend.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/commit/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/identifier/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/aggregate/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/reference/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/write/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/value/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/SelectorExecutionPlan.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/token/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authentication/user/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/WhiteboardCallback.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/callback/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/token/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/principal/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/privilege/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/util/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/CompositeRegistration.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/WhiteboardAware.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/whiteboard/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/xml/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/stats/RepositoryStats.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/stats/StatisticManager.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/cache/ConcurrentTest.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/MongoBlobGCTest.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/CloudStoreUtils.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/DocumentMKCloudGetLengthTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/DocumentMKCloudReadTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/DocumentMKCloudWriteTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobGCTest.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/cloud/MongoCloudBlobStoreTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/DataStoreUtils.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/DocumentMKDataStoreGetLengthTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/DocumentMKDataStoreReadTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/DocumentMKDataStoreWriteTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobGCTest.java   (props changed)
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/blob/ds/MongoDataStoreBlobStoreTest.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-it/mk/src/test/java/org/apache/jackrabbit/mk/test/MongoCloudBlobMicroKernelFixture.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-it/mk/src/test/java/org/apache/jackrabbit/mk/test/MongoDataStoreBlobMicroKernelFixture.java   (contents, props changed)
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ConcurrentReadIT.java   (props changed)
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/LargeOperationIT.java   (props changed)
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/ValueJcrTest.java   (props changed)
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/client/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-mk-remote/src/main/java/org/apache/jackrabbit/mk/server/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/GarbageCollectableBlobStore.java   (props changed)
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/index/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/server/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/util/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/package-info.java   (props changed)
    jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/package-info.java   (props changed)

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityProviderManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalIdentityRef.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalUser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/SyncManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DefaultSyncHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalIDPManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModuleFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/SyncManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalLoginModuleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/ExternalLoginModuleTestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-external/src/test/java/org/apache/jackrabbit/oak/spi/security/authentication/external/TestIdentityProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/DebugTimer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapGroup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapIdentityProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapProviderConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapSettings.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/LdapUser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/PoolableUnboundConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/impl/UnboundLdapConnectionPool.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/main/java/org/apache/jackrabbit/oak/security/authentication/ldap/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/InternalLdapServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginStandaloneTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginTestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapLoginWithRepoLoginTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-auth-ldap/src/test/java/org/apache/jackrabbit/oak/security/authentication/ldap/LdapProviderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java?rev=1568240&r1=1568239&r2=1568240&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java (original)
+++ jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java Fri Feb 14 11:21:31 2014
@@ -1,663 +1,663 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.oak.commons.sort;
-
-// filename: ExternalSort.java
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.PriorityQueue;
-import java.util.zip.Deflater;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-/**
- * Source copied from a publicly available library.
- * @see <a
- *  href="https://code.google.com/p/externalsortinginjava/">https://code.google.com/p/externalsortinginjava</a>
- *  
- * Goal: offer a generic external-memory sorting program in Java.
- * 
- * It must be : - hackable (easy to adapt) - scalable to large files - sensibly efficient.
- * 
- * This software is in the public domain.
- * 
- * Usage: java org/apache/oak/commons/sort//ExternalSort somefile.txt out.txt
- * 
- * You can change the default maximal number of temporary files with the -t flag: java
- * org/apache/oak/commons/sort/ExternalSort somefile.txt out.txt -t 3
- * 
- * For very large files, you might want to use an appropriate flag to allocate more memory to the
- * Java VM: java -Xms2G org/apache/oak/commons/sort/ExternalSort somefile.txt out.txt
- * 
- * By (in alphabetical order) Philippe Beaudoin, Eleftherios Chetzakis, Jon Elsas, Christan Grant,
- * Daniel Haran, Daniel Lemire, Sugumaran Harikrishnan, Jerry Yang, First published: April 2010
- * originally posted at http://lemire.me/blog/archives/2010/04/01/external-memory-sorting-in-java/
- */
-public class ExternalSort {
-
-    /*
-     * This sorts a file (input) to an output file (output) using default parameters
-     * 
-     * @param file source file
-     * 
-     * @param file output file
-     */
-    public static void sort(File input, File output) throws IOException {
-        ExternalSort.mergeSortedFiles(ExternalSort.sortInBatch(input), output);
-    }
-
-    static int DEFAULTMAXTEMPFILES = 1024;
-
-    // we divide the file into small blocks. If the blocks
-    // are too small, we shall create too many temporary files.
-    // If they are too big, we shall be using too much memory.
-    public static long estimateBestSizeOfBlocks(File filetobesorted,
-            int maxtmpfiles) {
-        long sizeoffile = filetobesorted.length() * 2;
-        /**
-         * We multiply by two because later on someone insisted on counting the memory usage as 2
-         * bytes per character. By this model, loading a file with 1 character will use 2 bytes.
-         */
-        // we don't want to open up much more than maxtmpfiles temporary
-        // files, better run
-        // out of memory first.
-        long blocksize = sizeoffile / maxtmpfiles
-                + (sizeoffile % maxtmpfiles == 0 ? 0 : 1);
-
-        // on the other hand, we don't want to create many temporary
-        // files
-        // for naught. If blocksize is smaller than half the free
-        // memory, grow it.
-        long freemem = Runtime.getRuntime().freeMemory();
-        if (blocksize < freemem / 2) {
-            blocksize = freemem / 2;
-        }
-        return blocksize;
-    }
-
-    /**
-     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
-     * result to temporary files that have to be merged later.
-     * 
-     * @param file
-     *            some flat file
-     * @param cmp
-     *            string comparator
-     * @return a list of temporary flat files
-     */
-    public static List<File> sortInBatch(File file)
-            throws IOException {
-        return sortInBatch(file, defaultcomparator, DEFAULTMAXTEMPFILES,
-                Charset.defaultCharset(), null, false);
-    }
-
-    /**
-     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
-     * result to temporary files that have to be merged later.
-     * 
-     * @param file
-     *            some flat file
-     * @param cmp
-     *            string comparator
-     * @return a list of temporary flat files
-     */
-    public static List<File> sortInBatch(File file, Comparator<String> cmp)
-            throws IOException {
-        return sortInBatch(file, cmp, DEFAULTMAXTEMPFILES,
-                Charset.defaultCharset(), null, false);
-    }
-
-    /**
-     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
-     * result to temporary files that have to be merged later.
-     * 
-     * @param file
-     *            some flat file
-     * @param cmp
-     *            string comparator
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded.
-     * @return a list of temporary flat files
-     */
-    public static List<File> sortInBatch(File file, Comparator<String> cmp,
-            boolean distinct) throws IOException {
-        return sortInBatch(file, cmp, DEFAULTMAXTEMPFILES,
-                Charset.defaultCharset(), null, distinct);
-    }
-
-    /**
-     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
-     * result to temporary files that have to be merged later. You can specify a bound on the number
-     * of temporary files that will be created.
-     * 
-     * @param file
-     *            some flat file
-     * @param cmp
-     *            string comparator
-     * @param maxtmpfiles
-     *            maximal number of temporary files
-     * @param Charset
-     *            character set to use (can use Charset.defaultCharset())
-     * @param tmpdirectory
-     *            location of the temporary files (set to null for default location)
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded.
-     * @param numHeader
-     *            number of lines to preclude before sorting starts
-     * @parame usegzip use gzip compression for the temporary files
-     * @return a list of temporary flat files
-     */
-    public static List<File> sortInBatch(File file, Comparator<String> cmp,
-            int maxtmpfiles, Charset cs, File tmpdirectory,
-            boolean distinct, int numHeader, boolean usegzip)
-            throws IOException {
-        List<File> files = new ArrayList<File>();
-        BufferedReader fbr = new BufferedReader(new InputStreamReader(
-                new FileInputStream(file), cs));
-        long blocksize = estimateBestSizeOfBlocks(file, maxtmpfiles);// in
-                                                                     // bytes
-
-        try {
-            List<String> tmplist = new ArrayList<String>();
-            String line = "";
-            try {
-                int counter = 0;
-                while (line != null) {
-                    long currentblocksize = 0;// in bytes
-                    while ((currentblocksize < blocksize)
-                            && ((line = fbr.readLine()) != null)) {
-                        // as long as you have enough memory
-                        if (counter < numHeader) {
-                            counter++;
-                            continue;
-                        }
-                        tmplist.add(line);
-                        // ram usage estimation, not
-                        // very accurate, still more
-                        // realistic that the simple 2 *
-                        // String.length
-                        currentblocksize += StringSizeEstimator
-                                .estimatedSizeOf(line);
-                    }
-                    files.add(sortAndSave(tmplist, cmp, cs,
-                            tmpdirectory, distinct, usegzip));
-                    tmplist.clear();
-                }
-            } catch (EOFException oef) {
-                if (tmplist.size() > 0) {
-                    files.add(sortAndSave(tmplist, cmp, cs,
-                            tmpdirectory, distinct, usegzip));
-                    tmplist.clear();
-                }
-            }
-        } finally {
-            fbr.close();
-        }
-        return files;
-    }
-
-    /**
-     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
-     * result to temporary files that have to be merged later. You can specify a bound on the number
-     * of temporary files that will be created.
-     * 
-     * @param file
-     *            some flat file
-     * @param cmp
-     *            string comparator
-     * @param maxtmpfiles
-     *            maximal number of temporary files
-     * @param Charset
-     *            character set to use (can use Charset.defaultCharset())
-     * @param tmpdirectory
-     *            location of the temporary files (set to null for default location)
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded.
-     * @return a list of temporary flat files
-     */
-    public static List<File> sortInBatch(File file, Comparator<String> cmp,
-            int maxtmpfiles, Charset cs, File tmpdirectory, boolean distinct)
-            throws IOException {
-        return sortInBatch(file, cmp, maxtmpfiles, cs, tmpdirectory,
-                distinct, 0, false);
-    }
-
-    /**
-     * Sort a list and save it to a temporary file
-     * 
-     * @return the file containing the sorted data
-     * @param tmplist
-     *            data to be sorted
-     * @param cmp
-     *            string comparator
-     * @param cs
-     *            charset to use for output (can use Charset.defaultCharset())
-     * @param tmpdirectory
-     *            location of the temporary files (set to null for default location)
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded.
-     */
-    public static File sortAndSave(List<String> tmplist,
-            Comparator<String> cmp, Charset cs, File tmpdirectory,
-            boolean distinct, boolean usegzip) throws IOException {
-        Collections.sort(tmplist, cmp);
-        File newtmpfile = File.createTempFile("sortInBatch",
-                "flatfile", tmpdirectory);
-        newtmpfile.deleteOnExit();
-        OutputStream out = new FileOutputStream(newtmpfile);
-        int ZIPBUFFERSIZE = 2048;
-        if (usegzip)
-            out = new GZIPOutputStream(out, ZIPBUFFERSIZE) {
-                {
-                    def.setLevel(Deflater.BEST_SPEED);
-                }
-            };
-        BufferedWriter fbw = new BufferedWriter(new OutputStreamWriter(
-                out, cs));
-        String lastLine = null;
-        try {
-            for (String r : tmplist) {
-                // Skip duplicate lines
-                if (!distinct || !r.equals(lastLine)) {
-                    fbw.write(r);
-                    fbw.newLine();
-                    lastLine = r;
-                }
-            }
-        } finally {
-            fbw.close();
-        }
-        return newtmpfile;
-    }
-
-    /**
-     * Sort a list and save it to a temporary file
-     * 
-     * @return the file containing the sorted data
-     * @param tmplist
-     *            data to be sorted
-     * @param cmp
-     *            string comparator
-     * @param cs
-     *            charset to use for output (can use Charset.defaultCharset())
-     * @param tmpdirectory
-     *            location of the temporary files (set to null for default location)
-     */
-    public static File sortAndSave(List<String> tmplist,
-            Comparator<String> cmp, Charset cs, File tmpdirectory)
-            throws IOException {
-        return sortAndSave(tmplist, cmp, cs, tmpdirectory, false, false);
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     * @param output
-     *            file
-     * @return The number of lines sorted. (P. Beaudoin)
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile) throws IOException {
-        return mergeSortedFiles(files, outputfile, defaultcomparator,
-                Charset.defaultCharset());
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     * @param output
-     *            file
-     * @return The number of lines sorted. (P. Beaudoin)
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile,
-            final Comparator<String> cmp) throws IOException {
-        return mergeSortedFiles(files, outputfile, cmp,
-                Charset.defaultCharset());
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     * @param output
-     *            file
-     * @return The number of lines sorted. (P. Beaudoin)
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile,
-            final Comparator<String> cmp, boolean distinct)
-            throws IOException {
-        return mergeSortedFiles(files, outputfile, cmp,
-                Charset.defaultCharset(), distinct);
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     *            The {@link List} of sorted {@link File}s to be merged.
-     * @param Charset
-     *            character set to use to load the strings
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
-     * @param outputfile
-     *            The output {@link File} to merge the results to.
-     * @param cmp
-     *            The {@link Comparator} to use to compare {@link String}s.
-     * @param cs
-     *            The {@link Charset} to be used for the byte to character conversion.
-     * @param append
-     *            Pass <code>true</code> if result should append to {@link File} instead of
-     *            overwrite. Default to be false for overloading methods.
-     * @param usegzip
-     *            assumes we used gzip compression for temporary files
-     * @return The number of lines sorted. (P. Beaudoin)
-     * @since v0.1.4
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile,
-            final Comparator<String> cmp, Charset cs, boolean distinct,
-            boolean append, boolean usegzip) throws IOException {
-        PriorityQueue<BinaryFileBuffer> pq = new PriorityQueue<BinaryFileBuffer>(
-                11, new Comparator<BinaryFileBuffer>() {
-                    @Override
-                    public int compare(BinaryFileBuffer i,
-                            BinaryFileBuffer j) {
-                        return cmp.compare(i.peek(), j.peek());
-                    }
-                });
-        ArrayList<BinaryFileBuffer> bfbs = new ArrayList<BinaryFileBuffer>();
-        for (File f : files) {
-            final int BUFFERSIZE = 2048;
-            InputStream in = new FileInputStream(f);
-            BufferedReader br;
-            if (usegzip) {
-                br = new BufferedReader(new InputStreamReader(
-                        new GZIPInputStream(in, BUFFERSIZE), cs));
-            } else {
-                br = new BufferedReader(new InputStreamReader(in,
-                        cs));
-            }
-
-            BinaryFileBuffer bfb = new BinaryFileBuffer(br);
-            bfbs.add(bfb);
-        }
-        BufferedWriter fbw = new BufferedWriter(new OutputStreamWriter(
-                new FileOutputStream(outputfile, append), cs));
-        int rowcounter = merge(fbw, cmp, distinct, bfbs);
-        for (File f : files)
-            f.delete();
-        return rowcounter;
-    }
-
-    /**
-     * This merges several BinaryFileBuffer to an output writer.
-     * 
-     * @param BufferedWriter
-     *            A buffer where we write the data.
-     * @param cmp
-     *            A comparator object that tells us how to sort the lines.
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
-     * @param buffers
-     *            Where the data should be read.
-     * @return The number of lines sorted. (P. Beaudoin)
-     * 
-     */
-    public static int merge(BufferedWriter fbw, final Comparator<String> cmp, boolean distinct,
-            List<BinaryFileBuffer> buffers) throws IOException {
-        PriorityQueue<BinaryFileBuffer> pq = new PriorityQueue<BinaryFileBuffer>(
-                11, new Comparator<BinaryFileBuffer>() {
-                    @Override
-                    public int compare(BinaryFileBuffer i,
-                            BinaryFileBuffer j) {
-                        return cmp.compare(i.peek(), j.peek());
-                    }
-                });
-        for (BinaryFileBuffer bfb : buffers)
-            if (!bfb.empty())
-                pq.add(bfb);
-        int rowcounter = 0;
-        String lastLine = null;
-        try {
-            while (pq.size() > 0) {
-                BinaryFileBuffer bfb = pq.poll();
-                String r = bfb.pop();
-                // Skip duplicate lines
-                if (!distinct || !r.equals(lastLine)) {
-                    fbw.write(r);
-                    fbw.newLine();
-                    lastLine = r;
-                }
-                ++rowcounter;
-                if (bfb.empty()) {
-                    bfb.fbr.close();
-                } else {
-                    pq.add(bfb); // add it back
-                }
-            }
-        } finally {
-            fbw.close();
-            for (BinaryFileBuffer bfb : pq)
-                bfb.close();
-        }
-        return rowcounter;
-
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     *            The {@link List} of sorted {@link File}s to be merged.
-     * @param Charset
-     *            character set to use to load the strings
-     * @param distinct
-     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
-     * @param outputfile
-     *            The output {@link File} to merge the results to.
-     * @param cmp
-     *            The {@link Comparator} to use to compare {@link String}s.
-     * @param cs
-     *            The {@link Charset} to be used for the byte to character conversion.
-     * @return The number of lines sorted. (P. Beaudoin)
-     * @since v0.1.2
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile,
-            final Comparator<String> cmp, Charset cs, boolean distinct)
-            throws IOException {
-        return mergeSortedFiles(files, outputfile, cmp, cs, distinct,
-                false, false);
-    }
-
-    /**
-     * This merges a bunch of temporary flat files
-     * 
-     * @param files
-     * @param output
-     *            file
-     * @param Charset
-     *            character set to use to load the strings
-     * @return The number of lines sorted. (P. Beaudoin)
-     */
-    public static int mergeSortedFiles(List<File> files, File outputfile,
-            final Comparator<String> cmp, Charset cs) throws IOException {
-        return mergeSortedFiles(files, outputfile, cmp, cs, false);
-    }
-
-    public static void displayUsage() {
-        System.out
-                .println("java com.google.externalsorting.ExternalSort inputfile outputfile");
-        System.out.println("Flags are:");
-        System.out.println("-v or --verbose: verbose output");
-        System.out.println("-d or --distinct: prune duplicate lines");
-        System.out
-                .println("-t or --maxtmpfiles (followed by an integer): specify an upper bound on the number of temporary files");
-        System.out
-                .println("-c or --charset (followed by a charset code): specify the character set to use (for sorting)");
-        System.out
-                .println("-z or --gzip: use compression for the temporary files");
-        System.out
-                .println("-H or --header (followed by an integer): ignore the first few lines");
-        System.out
-                .println("-s or --store (following by a path): where to store the temporary files");
-        System.out.println("-h or --help: display this message");
-    }
-
-    public static void main(String[] args) throws IOException {
-        boolean verbose = false;
-        boolean distinct = false;
-        int maxtmpfiles = DEFAULTMAXTEMPFILES;
-        Charset cs = Charset.defaultCharset();
-        String inputfile = null, outputfile = null;
-        File tempFileStore = null;
-        boolean usegzip = false;
-        int headersize = 0;
-        for (int param = 0; param < args.length; ++param) {
-            if (args[param].equals("-v")
-                    || args[param].equals("--verbose")) {
-                verbose = true;
-            } else if ((args[param].equals("-h") || args[param]
-                    .equals("--help"))) {
-                displayUsage();
-                return;
-            } else if ((args[param].equals("-d") || args[param]
-                    .equals("--distinct"))) {
-                distinct = true;
-            } else if ((args[param].equals("-t") || args[param]
-                    .equals("--maxtmpfiles"))
-                    && args.length > param + 1) {
-                param++;
-                maxtmpfiles = Integer.parseInt(args[param]);
-                if (headersize < 0) {
-                    System.err
-                            .println("maxtmpfiles should be positive");
-                }
-            } else if ((args[param].equals("-c") || args[param]
-                    .equals("--charset"))
-                    && args.length > param + 1) {
-                param++;
-                cs = Charset.forName(args[param]);
-            } else if ((args[param].equals("-z") || args[param]
-                    .equals("--gzip"))) {
-                usegzip = true;
-            } else if ((args[param].equals("-H") || args[param]
-                    .equals("--header")) && args.length > param + 1) {
-                param++;
-                headersize = Integer.parseInt(args[param]);
-                if (headersize < 0) {
-                    System.err
-                            .println("headersize should be positive");
-                }
-            } else if ((args[param].equals("-s") || args[param]
-                    .equals("--store")) && args.length > param + 1) {
-                param++;
-                tempFileStore = new File(args[param]);
-            } else {
-                if (inputfile == null)
-                    inputfile = args[param];
-                else if (outputfile == null)
-                    outputfile = args[param];
-                else
-                    System.out.println("Unparsed: "
-                            + args[param]);
-            }
-        }
-        if (outputfile == null) {
-            System.out
-                    .println("please provide input and output file names");
-            displayUsage();
-            return;
-        }
-        Comparator<String> comparator = defaultcomparator;
-        List<File> l = sortInBatch(new File(inputfile), comparator,
-                maxtmpfiles, cs, tempFileStore, distinct, headersize,
-                usegzip);
-        if (verbose)
-            System.out
-                    .println("created " + l.size() + " tmp files");
-        mergeSortedFiles(l, new File(outputfile), comparator, cs,
-                distinct, false, usegzip);
-    }
-
-    public static Comparator<String> defaultcomparator = new Comparator<String>() {
-        @Override
-        public int compare(String r1, String r2) {
-            return r1.compareTo(r2);
-        }
-    };
-
-}
-
-class BinaryFileBuffer {
-    public BufferedReader fbr;
-    private String cache;
-    private boolean empty;
-
-    public BinaryFileBuffer(BufferedReader r)
-            throws IOException {
-        this.fbr = r;
-        reload();
-    }
-
-    public boolean empty() {
-        return this.empty;
-    }
-
-    private void reload() throws IOException {
-        try {
-            if ((this.cache = this.fbr.readLine()) == null) {
-                this.empty = true;
-                this.cache = null;
-            } else {
-                this.empty = false;
-            }
-        } catch (EOFException oef) {
-            this.empty = true;
-            this.cache = null;
-        }
-    }
-
-    public void close() throws IOException {
-        this.fbr.close();
-    }
-
-    public String peek() {
-        if (empty())
-            return null;
-        return this.cache.toString();
-    }
-
-    public String pop() throws IOException {
-        String answer = peek();
-        reload();
-        return answer;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.commons.sort;
+
+// filename: ExternalSort.java
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.PriorityQueue;
+import java.util.zip.Deflater;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+/**
+ * Source copied from a publicly available library.
+ * @see <a
+ *  href="https://code.google.com/p/externalsortinginjava/">https://code.google.com/p/externalsortinginjava</a>
+ *  
+ * Goal: offer a generic external-memory sorting program in Java.
+ * 
+ * It must be : - hackable (easy to adapt) - scalable to large files - sensibly efficient.
+ * 
+ * This software is in the public domain.
+ * 
+ * Usage: java org/apache/oak/commons/sort//ExternalSort somefile.txt out.txt
+ * 
+ * You can change the default maximal number of temporary files with the -t flag: java
+ * org/apache/oak/commons/sort/ExternalSort somefile.txt out.txt -t 3
+ * 
+ * For very large files, you might want to use an appropriate flag to allocate more memory to the
+ * Java VM: java -Xms2G org/apache/oak/commons/sort/ExternalSort somefile.txt out.txt
+ * 
+ * By (in alphabetical order) Philippe Beaudoin, Eleftherios Chetzakis, Jon Elsas, Christan Grant,
+ * Daniel Haran, Daniel Lemire, Sugumaran Harikrishnan, Jerry Yang, First published: April 2010
+ * originally posted at http://lemire.me/blog/archives/2010/04/01/external-memory-sorting-in-java/
+ */
+public class ExternalSort {
+
+    /*
+     * This sorts a file (input) to an output file (output) using default parameters
+     * 
+     * @param file source file
+     * 
+     * @param file output file
+     */
+    public static void sort(File input, File output) throws IOException {
+        ExternalSort.mergeSortedFiles(ExternalSort.sortInBatch(input), output);
+    }
+
+    static int DEFAULTMAXTEMPFILES = 1024;
+
+    // we divide the file into small blocks. If the blocks
+    // are too small, we shall create too many temporary files.
+    // If they are too big, we shall be using too much memory.
+    public static long estimateBestSizeOfBlocks(File filetobesorted,
+            int maxtmpfiles) {
+        long sizeoffile = filetobesorted.length() * 2;
+        /**
+         * We multiply by two because later on someone insisted on counting the memory usage as 2
+         * bytes per character. By this model, loading a file with 1 character will use 2 bytes.
+         */
+        // we don't want to open up much more than maxtmpfiles temporary
+        // files, better run
+        // out of memory first.
+        long blocksize = sizeoffile / maxtmpfiles
+                + (sizeoffile % maxtmpfiles == 0 ? 0 : 1);
+
+        // on the other hand, we don't want to create many temporary
+        // files
+        // for naught. If blocksize is smaller than half the free
+        // memory, grow it.
+        long freemem = Runtime.getRuntime().freeMemory();
+        if (blocksize < freemem / 2) {
+            blocksize = freemem / 2;
+        }
+        return blocksize;
+    }
+
+    /**
+     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
+     * result to temporary files that have to be merged later.
+     * 
+     * @param file
+     *            some flat file
+     * @param cmp
+     *            string comparator
+     * @return a list of temporary flat files
+     */
+    public static List<File> sortInBatch(File file)
+            throws IOException {
+        return sortInBatch(file, defaultcomparator, DEFAULTMAXTEMPFILES,
+                Charset.defaultCharset(), null, false);
+    }
+
+    /**
+     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
+     * result to temporary files that have to be merged later.
+     * 
+     * @param file
+     *            some flat file
+     * @param cmp
+     *            string comparator
+     * @return a list of temporary flat files
+     */
+    public static List<File> sortInBatch(File file, Comparator<String> cmp)
+            throws IOException {
+        return sortInBatch(file, cmp, DEFAULTMAXTEMPFILES,
+                Charset.defaultCharset(), null, false);
+    }
+
+    /**
+     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
+     * result to temporary files that have to be merged later.
+     * 
+     * @param file
+     *            some flat file
+     * @param cmp
+     *            string comparator
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded.
+     * @return a list of temporary flat files
+     */
+    public static List<File> sortInBatch(File file, Comparator<String> cmp,
+            boolean distinct) throws IOException {
+        return sortInBatch(file, cmp, DEFAULTMAXTEMPFILES,
+                Charset.defaultCharset(), null, distinct);
+    }
+
+    /**
+     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
+     * result to temporary files that have to be merged later. You can specify a bound on the number
+     * of temporary files that will be created.
+     * 
+     * @param file
+     *            some flat file
+     * @param cmp
+     *            string comparator
+     * @param maxtmpfiles
+     *            maximal number of temporary files
+     * @param Charset
+     *            character set to use (can use Charset.defaultCharset())
+     * @param tmpdirectory
+     *            location of the temporary files (set to null for default location)
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded.
+     * @param numHeader
+     *            number of lines to preclude before sorting starts
+     * @parame usegzip use gzip compression for the temporary files
+     * @return a list of temporary flat files
+     */
+    public static List<File> sortInBatch(File file, Comparator<String> cmp,
+            int maxtmpfiles, Charset cs, File tmpdirectory,
+            boolean distinct, int numHeader, boolean usegzip)
+            throws IOException {
+        List<File> files = new ArrayList<File>();
+        BufferedReader fbr = new BufferedReader(new InputStreamReader(
+                new FileInputStream(file), cs));
+        long blocksize = estimateBestSizeOfBlocks(file, maxtmpfiles);// in
+                                                                     // bytes
+
+        try {
+            List<String> tmplist = new ArrayList<String>();
+            String line = "";
+            try {
+                int counter = 0;
+                while (line != null) {
+                    long currentblocksize = 0;// in bytes
+                    while ((currentblocksize < blocksize)
+                            && ((line = fbr.readLine()) != null)) {
+                        // as long as you have enough memory
+                        if (counter < numHeader) {
+                            counter++;
+                            continue;
+                        }
+                        tmplist.add(line);
+                        // ram usage estimation, not
+                        // very accurate, still more
+                        // realistic that the simple 2 *
+                        // String.length
+                        currentblocksize += StringSizeEstimator
+                                .estimatedSizeOf(line);
+                    }
+                    files.add(sortAndSave(tmplist, cmp, cs,
+                            tmpdirectory, distinct, usegzip));
+                    tmplist.clear();
+                }
+            } catch (EOFException oef) {
+                if (tmplist.size() > 0) {
+                    files.add(sortAndSave(tmplist, cmp, cs,
+                            tmpdirectory, distinct, usegzip));
+                    tmplist.clear();
+                }
+            }
+        } finally {
+            fbr.close();
+        }
+        return files;
+    }
+
+    /**
+     * This will simply load the file by blocks of lines, then sort them in-memory, and write the
+     * result to temporary files that have to be merged later. You can specify a bound on the number
+     * of temporary files that will be created.
+     * 
+     * @param file
+     *            some flat file
+     * @param cmp
+     *            string comparator
+     * @param maxtmpfiles
+     *            maximal number of temporary files
+     * @param Charset
+     *            character set to use (can use Charset.defaultCharset())
+     * @param tmpdirectory
+     *            location of the temporary files (set to null for default location)
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded.
+     * @return a list of temporary flat files
+     */
+    public static List<File> sortInBatch(File file, Comparator<String> cmp,
+            int maxtmpfiles, Charset cs, File tmpdirectory, boolean distinct)
+            throws IOException {
+        return sortInBatch(file, cmp, maxtmpfiles, cs, tmpdirectory,
+                distinct, 0, false);
+    }
+
+    /**
+     * Sort a list and save it to a temporary file
+     * 
+     * @return the file containing the sorted data
+     * @param tmplist
+     *            data to be sorted
+     * @param cmp
+     *            string comparator
+     * @param cs
+     *            charset to use for output (can use Charset.defaultCharset())
+     * @param tmpdirectory
+     *            location of the temporary files (set to null for default location)
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded.
+     */
+    public static File sortAndSave(List<String> tmplist,
+            Comparator<String> cmp, Charset cs, File tmpdirectory,
+            boolean distinct, boolean usegzip) throws IOException {
+        Collections.sort(tmplist, cmp);
+        File newtmpfile = File.createTempFile("sortInBatch",
+                "flatfile", tmpdirectory);
+        newtmpfile.deleteOnExit();
+        OutputStream out = new FileOutputStream(newtmpfile);
+        int ZIPBUFFERSIZE = 2048;
+        if (usegzip)
+            out = new GZIPOutputStream(out, ZIPBUFFERSIZE) {
+                {
+                    def.setLevel(Deflater.BEST_SPEED);
+                }
+            };
+        BufferedWriter fbw = new BufferedWriter(new OutputStreamWriter(
+                out, cs));
+        String lastLine = null;
+        try {
+            for (String r : tmplist) {
+                // Skip duplicate lines
+                if (!distinct || !r.equals(lastLine)) {
+                    fbw.write(r);
+                    fbw.newLine();
+                    lastLine = r;
+                }
+            }
+        } finally {
+            fbw.close();
+        }
+        return newtmpfile;
+    }
+
+    /**
+     * Sort a list and save it to a temporary file
+     * 
+     * @return the file containing the sorted data
+     * @param tmplist
+     *            data to be sorted
+     * @param cmp
+     *            string comparator
+     * @param cs
+     *            charset to use for output (can use Charset.defaultCharset())
+     * @param tmpdirectory
+     *            location of the temporary files (set to null for default location)
+     */
+    public static File sortAndSave(List<String> tmplist,
+            Comparator<String> cmp, Charset cs, File tmpdirectory)
+            throws IOException {
+        return sortAndSave(tmplist, cmp, cs, tmpdirectory, false, false);
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     * @param output
+     *            file
+     * @return The number of lines sorted. (P. Beaudoin)
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile) throws IOException {
+        return mergeSortedFiles(files, outputfile, defaultcomparator,
+                Charset.defaultCharset());
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     * @param output
+     *            file
+     * @return The number of lines sorted. (P. Beaudoin)
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile,
+            final Comparator<String> cmp) throws IOException {
+        return mergeSortedFiles(files, outputfile, cmp,
+                Charset.defaultCharset());
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     * @param output
+     *            file
+     * @return The number of lines sorted. (P. Beaudoin)
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile,
+            final Comparator<String> cmp, boolean distinct)
+            throws IOException {
+        return mergeSortedFiles(files, outputfile, cmp,
+                Charset.defaultCharset(), distinct);
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     *            The {@link List} of sorted {@link File}s to be merged.
+     * @param Charset
+     *            character set to use to load the strings
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
+     * @param outputfile
+     *            The output {@link File} to merge the results to.
+     * @param cmp
+     *            The {@link Comparator} to use to compare {@link String}s.
+     * @param cs
+     *            The {@link Charset} to be used for the byte to character conversion.
+     * @param append
+     *            Pass <code>true</code> if result should append to {@link File} instead of
+     *            overwrite. Default to be false for overloading methods.
+     * @param usegzip
+     *            assumes we used gzip compression for temporary files
+     * @return The number of lines sorted. (P. Beaudoin)
+     * @since v0.1.4
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile,
+            final Comparator<String> cmp, Charset cs, boolean distinct,
+            boolean append, boolean usegzip) throws IOException {
+        PriorityQueue<BinaryFileBuffer> pq = new PriorityQueue<BinaryFileBuffer>(
+                11, new Comparator<BinaryFileBuffer>() {
+                    @Override
+                    public int compare(BinaryFileBuffer i,
+                            BinaryFileBuffer j) {
+                        return cmp.compare(i.peek(), j.peek());
+                    }
+                });
+        ArrayList<BinaryFileBuffer> bfbs = new ArrayList<BinaryFileBuffer>();
+        for (File f : files) {
+            final int BUFFERSIZE = 2048;
+            InputStream in = new FileInputStream(f);
+            BufferedReader br;
+            if (usegzip) {
+                br = new BufferedReader(new InputStreamReader(
+                        new GZIPInputStream(in, BUFFERSIZE), cs));
+            } else {
+                br = new BufferedReader(new InputStreamReader(in,
+                        cs));
+            }
+
+            BinaryFileBuffer bfb = new BinaryFileBuffer(br);
+            bfbs.add(bfb);
+        }
+        BufferedWriter fbw = new BufferedWriter(new OutputStreamWriter(
+                new FileOutputStream(outputfile, append), cs));
+        int rowcounter = merge(fbw, cmp, distinct, bfbs);
+        for (File f : files)
+            f.delete();
+        return rowcounter;
+    }
+
+    /**
+     * This merges several BinaryFileBuffer to an output writer.
+     * 
+     * @param BufferedWriter
+     *            A buffer where we write the data.
+     * @param cmp
+     *            A comparator object that tells us how to sort the lines.
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
+     * @param buffers
+     *            Where the data should be read.
+     * @return The number of lines sorted. (P. Beaudoin)
+     * 
+     */
+    public static int merge(BufferedWriter fbw, final Comparator<String> cmp, boolean distinct,
+            List<BinaryFileBuffer> buffers) throws IOException {
+        PriorityQueue<BinaryFileBuffer> pq = new PriorityQueue<BinaryFileBuffer>(
+                11, new Comparator<BinaryFileBuffer>() {
+                    @Override
+                    public int compare(BinaryFileBuffer i,
+                            BinaryFileBuffer j) {
+                        return cmp.compare(i.peek(), j.peek());
+                    }
+                });
+        for (BinaryFileBuffer bfb : buffers)
+            if (!bfb.empty())
+                pq.add(bfb);
+        int rowcounter = 0;
+        String lastLine = null;
+        try {
+            while (pq.size() > 0) {
+                BinaryFileBuffer bfb = pq.poll();
+                String r = bfb.pop();
+                // Skip duplicate lines
+                if (!distinct || !r.equals(lastLine)) {
+                    fbw.write(r);
+                    fbw.newLine();
+                    lastLine = r;
+                }
+                ++rowcounter;
+                if (bfb.empty()) {
+                    bfb.fbr.close();
+                } else {
+                    pq.add(bfb); // add it back
+                }
+            }
+        } finally {
+            fbw.close();
+            for (BinaryFileBuffer bfb : pq)
+                bfb.close();
+        }
+        return rowcounter;
+
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     *            The {@link List} of sorted {@link File}s to be merged.
+     * @param Charset
+     *            character set to use to load the strings
+     * @param distinct
+     *            Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
+     * @param outputfile
+     *            The output {@link File} to merge the results to.
+     * @param cmp
+     *            The {@link Comparator} to use to compare {@link String}s.
+     * @param cs
+     *            The {@link Charset} to be used for the byte to character conversion.
+     * @return The number of lines sorted. (P. Beaudoin)
+     * @since v0.1.2
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile,
+            final Comparator<String> cmp, Charset cs, boolean distinct)
+            throws IOException {
+        return mergeSortedFiles(files, outputfile, cmp, cs, distinct,
+                false, false);
+    }
+
+    /**
+     * This merges a bunch of temporary flat files
+     * 
+     * @param files
+     * @param output
+     *            file
+     * @param Charset
+     *            character set to use to load the strings
+     * @return The number of lines sorted. (P. Beaudoin)
+     */
+    public static int mergeSortedFiles(List<File> files, File outputfile,
+            final Comparator<String> cmp, Charset cs) throws IOException {
+        return mergeSortedFiles(files, outputfile, cmp, cs, false);
+    }
+
+    public static void displayUsage() {
+        System.out
+                .println("java com.google.externalsorting.ExternalSort inputfile outputfile");
+        System.out.println("Flags are:");
+        System.out.println("-v or --verbose: verbose output");
+        System.out.println("-d or --distinct: prune duplicate lines");
+        System.out
+                .println("-t or --maxtmpfiles (followed by an integer): specify an upper bound on the number of temporary files");
+        System.out
+                .println("-c or --charset (followed by a charset code): specify the character set to use (for sorting)");
+        System.out
+                .println("-z or --gzip: use compression for the temporary files");
+        System.out
+                .println("-H or --header (followed by an integer): ignore the first few lines");
+        System.out
+                .println("-s or --store (following by a path): where to store the temporary files");
+        System.out.println("-h or --help: display this message");
+    }
+
+    public static void main(String[] args) throws IOException {
+        boolean verbose = false;
+        boolean distinct = false;
+        int maxtmpfiles = DEFAULTMAXTEMPFILES;
+        Charset cs = Charset.defaultCharset();
+        String inputfile = null, outputfile = null;
+        File tempFileStore = null;
+        boolean usegzip = false;
+        int headersize = 0;
+        for (int param = 0; param < args.length; ++param) {
+            if (args[param].equals("-v")
+                    || args[param].equals("--verbose")) {
+                verbose = true;
+            } else if ((args[param].equals("-h") || args[param]
+                    .equals("--help"))) {
+                displayUsage();
+                return;
+            } else if ((args[param].equals("-d") || args[param]
+                    .equals("--distinct"))) {
+                distinct = true;
+            } else if ((args[param].equals("-t") || args[param]
+                    .equals("--maxtmpfiles"))
+                    && args.length > param + 1) {
+                param++;
+                maxtmpfiles = Integer.parseInt(args[param]);
+                if (headersize < 0) {
+                    System.err
+                            .println("maxtmpfiles should be positive");
+                }
+            } else if ((args[param].equals("-c") || args[param]
+                    .equals("--charset"))
+                    && args.length > param + 1) {
+                param++;
+                cs = Charset.forName(args[param]);
+            } else if ((args[param].equals("-z") || args[param]
+                    .equals("--gzip"))) {
+                usegzip = true;
+            } else if ((args[param].equals("-H") || args[param]
+                    .equals("--header")) && args.length > param + 1) {
+                param++;
+                headersize = Integer.parseInt(args[param]);
+                if (headersize < 0) {
+                    System.err
+                            .println("headersize should be positive");
+                }
+            } else if ((args[param].equals("-s") || args[param]
+                    .equals("--store")) && args.length > param + 1) {
+                param++;
+                tempFileStore = new File(args[param]);
+            } else {
+                if (inputfile == null)
+                    inputfile = args[param];
+                else if (outputfile == null)
+                    outputfile = args[param];
+                else
+                    System.out.println("Unparsed: "
+                            + args[param]);
+            }
+        }
+        if (outputfile == null) {
+            System.out
+                    .println("please provide input and output file names");
+            displayUsage();
+            return;
+        }
+        Comparator<String> comparator = defaultcomparator;
+        List<File> l = sortInBatch(new File(inputfile), comparator,
+                maxtmpfiles, cs, tempFileStore, distinct, headersize,
+                usegzip);
+        if (verbose)
+            System.out
+                    .println("created " + l.size() + " tmp files");
+        mergeSortedFiles(l, new File(outputfile), comparator, cs,
+                distinct, false, usegzip);
+    }
+
+    public static Comparator<String> defaultcomparator = new Comparator<String>() {
+        @Override
+        public int compare(String r1, String r2) {
+            return r1.compareTo(r2);
+        }
+    };
+
+}
+
+class BinaryFileBuffer {
+    public BufferedReader fbr;
+    private String cache;
+    private boolean empty;
+
+    public BinaryFileBuffer(BufferedReader r)
+            throws IOException {
+        this.fbr = r;
+        reload();
+    }
+
+    public boolean empty() {
+        return this.empty;
+    }
+
+    private void reload() throws IOException {
+        try {
+            if ((this.cache = this.fbr.readLine()) == null) {
+                this.empty = true;
+                this.cache = null;
+            } else {
+                this.empty = false;
+            }
+        } catch (EOFException oef) {
+            this.empty = true;
+            this.cache = null;
+        }
+    }
+
+    public void close() throws IOException {
+        this.fbr.close();
+    }
+
+    public String peek() {
+        if (empty())
+            return null;
+        return this.cache.toString();
+    }
+
+    public String pop() throws IOException {
+        String answer = peek();
+        reload();
+        return answer;
+    }
+
+}

Propchange: jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/StringSizeEstimator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/RepositoryStatsMBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/osgi/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreRestore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGarbageCollector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobStoreBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native