Package org.eclipse.emf.cdo.common.util

# Class CDOCommonUtil

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

public final class CDOCommonUtil extends 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
Description
`static final SimpleDateFormat`
`DATE_FORMAT`
`static final Pattern`
`DATE_PATTERN`
`static final Comparator<CDONameProvider>`
`NAME_COMPARATOR`
`static final String`
`SYSTEM_USER_ID`
`static final Comparator<CDOTimeProvider>`
`TIME_COMPARATOR`
`static final String`
`UNSPECIFIED_DATE_STRING`

## Method Summary

Modifier and Type
Method
Description
`static int`
`compareTimeStamps(long t1, long t2)`
`static CDODataInput`
`createCDODataInput(org.eclipse.net4j.util.io.ExtendedDataInputStream inputStream, CDOPackageRegistry packageRegistry, CDOBranchManager branchManager, CDOCommitInfoManager commitManager, CDORevisionFactory revisionFactory, CDOListFactory listFactory, CDOLobStore lobStore)`
`static CDODataOutput`
`createCDODataOutput(org.eclipse.net4j.util.io.ExtendedDataOutput extendedDataOutputStream, CDOPackageRegistry packageRegistry, CDOIDProvider idProvider)`
Deprecated.
As of 4.3 use `createCDODataOutput(ExtendedDataOutput, CDOPackageRegistry, CDOIDProvider, CDORevisionUnchunker)`.
`static CDODataOutput`
`createCDODataOutput(org.eclipse.net4j.util.io.ExtendedDataOutput extendedDataOutputStream, CDOPackageRegistry packageRegistry, CDOIDProvider idProvider, CDORevisionUnchunker unchunker)`
`static String`
`formatTimeStamp()`
`static String`
`formatTimeStamp(long timeStamp)`
`static boolean`
`isValidTimeStamp(long timeStamp, long startTime, long endTime)`
`static boolean`
`isWellFormedURI(String uri)`
A well formed URI string must have a non-zero length, and must encode any special characters such as the space character.
`static long`
`parseTimeStamp(String timeStamp)`
`static void`
`prepareContainer(org.eclipse.net4j.util.container.IManagedContainer container)`
`static boolean`
`waitWhileInitial(CDOCommonRepository repository, org.eclipse.net4j.util.event.INotifier notifier, IProgressMonitor monitor)`

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

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

## Field Details

### UNSPECIFIED_DATE_STRING

public static final String UNSPECIFIED_DATE_STRING

Since:
  4.5
See Also:
  - Constant Field Values

### DATE_FORMAT

public static final SimpleDateFormat DATE_FORMAT

Since:
  4.0

### DATE_PATTERN

public static final Pattern DATE_PATTERN

Since:
  4.4

### SYSTEM_USER_ID

public static final String SYSTEM_USER_ID

Since:
  4.2
See Also:
  - Constant Field Values

### NAME_COMPARATOR

public static final Comparator<CDONameProvider> NAME_COMPARATOR

Since:
  4.4

### TIME_COMPARATOR

public static final Comparator<CDOTimeProvider> TIME_COMPARATOR

Since:
  4.4

## Method Details

### prepareContainer

public static void prepareContainer(org.eclipse.net4j.util.container.IManagedContainer container)

Since:
  4.26

### createCDODataInput

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

Throws:
  `IOException`
Since:
  4.0

### createCDODataOutput

@Deprecated public static CDODataOutput createCDODataOutput(org.eclipse.net4j.util.io.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(org.eclipse.net4j.util.io.ExtendedDataOutput extendedDataOutputStream, CDOPackageRegistry packageRegistry, CDOIDProvider idProvider, CDORevisionUnchunker unchunker)

Since:
  4.3

### isWellFormedURI

public static boolean isWellFormedURI(String uri)
A well formed URI string must have a non-zero length, and must encode any special characters such as the space character. As such, creating a `URI`, ignoring the properly encoded characters, and converting that to a `string`, must yield this URI string itself.

Parameters:
  `uri` - the URI string in question.
Returns:
  whether the URI is well formed.
Since:
  4.21

### isValidTimeStamp

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

### compareTimeStamps

public static int compareTimeStamps(long t1, long t2)

### formatTimeStamp

public static String formatTimeStamp()

### formatTimeStamp

public static String formatTimeStamp(long timeStamp)

### parseTimeStamp

public static long parseTimeStamp(String timeStamp) throws ParseException

Throws:
  `ParseException`
Since:
  4.0

### waitWhileInitial

public static boolean waitWhileInitial(CDOCommonRepository repository, org.eclipse.net4j.util.event.INotifier notifier, IProgressMonitor monitor)

Since:
  4.2