org.eclipse.oomph.base.util

## Class BaseUtil

- java.lang.Object
- - org.eclipse.oomph.base.util.BaseUtil

-     public final class BaseUtil
      extends Object

  Author:
    Eike Stepper

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `copyFile(URIConverter uriConverter, Map<?,?> options, URI source, URI target)`
    `static void` | `deleteFile(URIConverter uriConverter, Map<?,?> options, URI uri)`
    `static boolean` | `execute(long timeout, Runnable runnable, URIConverter uriConverter, URI... uris)`
    `static EStructuralFeature` | `getFeature(EClass eClass, String xmlName)`
    `static <T> T` | `getObjectByType(Collection<?> objects, EClassifier type)`
    `static URI` | `getRootURI(EObject eObject)`
    `static BaseResource` | `loadResourceSafely(ResourceSet resourceSet, URI uri)`
    `static byte[]` | `readFile(URIConverter uriConverter, Map<?,?> options, URI uri)`
    `static void` | `saveEObject(EObject eObject)`
    `static void` | `writeFile(URIConverter uriConverter, Map<?,?> options, URI uri, byte[] bytes)`

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

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

- - ### Method Detail

    - #### loadResourceSafely

          public static BaseResource loadResourceSafely(ResourceSet resourceSet,
                                        URI uri)

    - #### saveEObject

          public static void saveEObject(EObject eObject)

    - #### getRootURI

          public static URI getRootURI(EObject eObject)

    - #### getFeature

          public static EStructuralFeature getFeature(EClass eClass,
                                      String xmlName)

    - #### copyFile

          public static void copyFile(URIConverter uriConverter,
                      Map<?,?> options,
                      URI source,
                      URI target)
                               throws IORuntimeException

      Throws:
        `IORuntimeException`

    - #### readFile

          public static byte[] readFile(URIConverter uriConverter,
                        Map<?,?> options,
                        URI uri)
                                 throws IORuntimeException

      Throws:
        `IORuntimeException`

    - #### writeFile

          public static void writeFile(URIConverter uriConverter,
                       Map<?,?> options,
                       URI uri,
                       byte[] bytes)
                                throws IORuntimeException

      Throws:
        `IORuntimeException`

    - #### deleteFile

          public static void deleteFile(URIConverter uriConverter,
                        Map<?,?> options,
                        URI uri)
                                 throws IORuntimeException

      Throws:
        `IORuntimeException`

    - #### getObjectByType

          public static <T> T getObjectByType(Collection<?> objects,
                              EClassifier type)

    - #### execute

          public static boolean execute(long timeout,
                        Runnable runnable,
                        URIConverter uriConverter,
                        URI... uris)

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