Tabnine Logo
IOUtil.getResourceAsString
Code IndexAdd Tabnine to your IDE (free)

How to use
getResourceAsString
method
in
org.identityconnectors.common.IOUtil

Best Java code snippets using org.identityconnectors.common.IOUtil.getResourceAsString (Showing top 7 results out of 315)

origin: org.connid/framework

/**
 * Read the entire stream into a String and return it.
 */
public static String getResourceAsString(Class<?> clazz, String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  return getResourceAsString(clazz, res, Charset.forName("UTF-8"));
}
origin: net.tirasa.connid/connector-framework

/**
 * Read the entire stream into a String and return it.
 *
 * @param clazz
 * @param res
 * @return
 */
public static String getResourceAsString(final Class<?> clazz, final String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  return getResourceAsString(clazz, res, Charset.forName("UTF-8"));
}
origin: Tirasa/ConnId

/**
 * Read the entire stream into a String and return it.
 *
 * @param clazz
 * @param res
 * @return
 */
public static String getResourceAsString(final Class<?> clazz, final String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  return getResourceAsString(clazz, res, Charset.forName("UTF-8"));
}
origin: org.connid/framework

String clazz = IOUtil.getResourceAsString(Log.class, serviceId);
if (StringUtil.isNotBlank(clazz)) {
  return forName(clazz.trim());
origin: net.tirasa.connid/connector-framework

final String clazz = IOUtil.getResourceAsString(Log.class, serviceId);
if (StringUtil.isNotBlank(clazz)) {
  return forName(clazz.trim());
origin: Tirasa/ConnId

final String clazz = IOUtil.getResourceAsString(Log.class, serviceId);
if (StringUtil.isNotBlank(clazz)) {
  return forName(clazz.trim());
origin: Tirasa/ConnId

@Test
public void testReplaceVariables() {
  // test using the following template..
  Map<String, String> vars = new HashMap<>();
  vars.put(PAUSE_TEXT, "PAUSE");
  vars.put(REFRESH_TIME, "5");
  vars.put(RESUME_TEXT, "RESUME");
  vars.put(GRAPH_IDS, "1,2,4345");
  String tmpl = IOUtil.getResourceAsString(getClass(), TEMPLATE);
  for (Map.Entry<String, String> entry : vars.entrySet()) {
    String key = entry.getKey();
    String value = entry.getValue();
    tmpl = StringUtil.replaceVariable(tmpl, key, value);
    assertTrue(tmpl.contains(value));
  }
}
org.identityconnectors.commonIOUtilgetResourceAsString

Javadoc

Read the entire stream into a String and return it.

Popular methods of IOUtil

  • quietClose
    Quietly closes the statement. This avoids having to handle exceptions, and then inside of the except
  • copyFile
    Copies one file to another. NOTE: does not close streams.
  • loadPropertiesFile
    Attempt to load file based on a string base filename.
  • readInputStreamBytes
    Reads an entire file and returns the bytes.
  • readerToString
    Takes a 'Reader' and returns the contents as a string.
  • checksum
    Calculates the CRC32 checksum of the specified file.
  • delete
    Recursively delete all the files in a directory and the directory.
  • extractResourceToFile
    Extracts the resource to a file.
  • getResourceAsProperties
    Loads the given resource as a properties object.
  • getResourceAsStream
    Returns an input stream of the resource specified.
  • getResourcePath
    Get the path to a resource base on the package of given class.
  • inputStreamToBytes
    Takes a 'InputStream' and returns a byte array.
  • getResourcePath,
  • inputStreamToBytes,
  • readFileBytes,
  • storePropertiesFile,
  • makeURL

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Reference (javax.naming)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now