org.eclipse.emf.cdo.common.util

## Class CDOCommonUtil

- java.lang.Object
- - org.eclipse.emf.cdo.common.util.CDOCommonUtil

-     public final class CDOCommonUtil
      extends java.lang.Object

  Various static methods that may help with I/O and time stamps.
  Since:
    3.0
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.text.SimpleDateFormat` | `DATE_FORMAT`
    `static java.util.regex.Pattern` | `DATE_PATTERN`
    `static java.util.Comparator<CDONameProvider>` | `NAME_COMPARATOR`
    `static java.lang.String` | `SYSTEM_USER_ID`
    `static java.util.Comparator<CDOTimeProvider>` | `TIME_COMPARATOR`
    `static java.lang.String` | `UNSPECIFIED_DATE_STRING`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `compareTimeStamps(long t1, long t2)`
    `static CDODataInput` | `createCDODataInput(ExtendedDataInputStream inputStream, CDOPackageRegistry packageRegistry, CDOBranchManager branchManager, CDOCommitInfoManager commitManager, CDORevisionFactory revisionFactory, CDOListFactory listFactory, CDOLobStore lobStore)`
    `static CDODataOutput` | `createCDODataOutput(ExtendedDataOutput extendedDataOutputStream, CDOPackageRegistry packageRegistry, CDOIDProvider idProvider)` Deprecated. As of 4.3 use `createCDODataOutput(ExtendedDataOutput, CDOPackageRegistry, CDOIDProvider, CDORevisionUnchunker)`.
    `static CDODataOutput` | `createCDODataOutput(ExtendedDataOutput extendedDataOutputStream, CDOPackageRegistry packageRegistry, CDOIDProvider idProvider, CDORevisionUnchunker unchunker)`
    `static java.lang.String` | `formatTimeStamp()`
    `static java.lang.String` | `formatTimeStamp(long timeStamp)`
    `static boolean` | `isValidTimeStamp(long timeStamp, long startTime, long endTime)`
    `static long` | `parseTimeStamp(java.lang.String timeStamp)`
    `static boolean` | `waitWhileInitial(CDOCommonRepository repository, INotifier notifier, IProgressMonitor monitor)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### UNSPECIFIED_DATE_STRING

          public static final java.lang.String UNSPECIFIED_DATE_STRING

      Since:
        4.5
      See Also:
        Constant Field Values

    - #### DATE_FORMAT

          public static final java.text.SimpleDateFormat DATE_FORMAT

      Since:
        4.0

    - #### DATE_PATTERN

          public static final java.util.regex.Pattern DATE_PATTERN

      Since:
        4.4

    - #### SYSTEM_USER_ID

          public static final java.lang.String SYSTEM_USER_ID

      Since:
        4.2
      See Also:
        Constant Field Values

    - #### NAME_COMPARATOR

          public static final java.util.Comparator<CDONameProvider> NAME_COMPARATOR

      Since:
        4.4

    - #### TIME_COMPARATOR

          public static final java.util.Comparator<CDOTimeProvider> TIME_COMPARATOR

      Since:
        4.4

  - ### Method Detail

    - #### createCDODataInput

          public static CDODataInput createCDODataInput(ExtendedDataInputStream inputStream,
                                                        CDOPackageRegistry packageRegistry,
                                                        CDOBranchManager branchManager,
                                                        CDOCommitInfoManager commitManager,
                                                        CDORevisionFactory revisionFactory,
                                                        CDOListFactory listFactory,
                                                        CDOLobStore lobStore)
                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`
      Since:
        4.0

    - #### createCDODataOutput

          @Deprecated
          public static CDODataOutput createCDODataOutput(ExtendedDataOutput extendedDataOutputStream,
                                                                       CDOPackageRegistry packageRegistry,
                                                                       CDOIDProvider idProvider)

      Deprecated. As of 4.3 use `createCDODataOutput(ExtendedDataOutput, CDOPackageRegistry, CDOIDProvider, CDORevisionUnchunker)`.
      Since:
        4.0

    - #### createCDODataOutput

          public static CDODataOutput createCDODataOutput(ExtendedDataOutput extendedDataOutputStream,
                                                          CDOPackageRegistry packageRegistry,
                                                          CDOIDProvider idProvider,
                                                          CDORevisionUnchunker unchunker)

      Since:
        4.3

    - #### isValidTimeStamp

          public static boolean isValidTimeStamp(long timeStamp,
                                                 long startTime,
                                                 long endTime)

    - #### compareTimeStamps

          public static int compareTimeStamps(long t1,
                                              long t2)

    - #### formatTimeStamp

          public static java.lang.String formatTimeStamp()

    - #### formatTimeStamp

          public static java.lang.String formatTimeStamp(long timeStamp)

    - #### parseTimeStamp

          public static long parseTimeStamp(java.lang.String timeStamp)
                                     throws java.text.ParseException

      Throws:
        `java.text.ParseException`
      Since:
        4.0

    - #### waitWhileInitial

          public static boolean waitWhileInitial(CDOCommonRepository repository,
                                                 INotifier notifier,
                                                 IProgressMonitor monitor)

      Since:
        4.2

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html