congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IOUtil.inputStreamToBytes
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.connid/framework

/**
 * Get the resource as a byte array.
 */
public static byte[] getResourceAsBytes(Class<?> clazz, String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  // copy bytes from the stream to an array..
  InputStream ins = getResourceAsStream(clazz, res);
  if (ins == null) {
    throw new IllegalStateException("Resource not found: " + res);
  }
  byte[] ret = inputStreamToBytes(ins);
  quietClose(ins);
  return ret;
}
origin: net.tirasa.connid/connector-framework

/**
 * Get the resource as a byte array.
 *
 * @param clazz
 * @param res
 * @return
 */
public static byte[] getResourceAsBytes(final Class<?> clazz, final String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  // copy bytes from the stream to an array..
  final InputStream ins = getResourceAsStream(clazz, res);
  if (ins == null) {
    throw new IllegalStateException("Resource not found: " + res);
  }
  final byte[] ret = inputStreamToBytes(ins);
  quietClose(ins);
  return ret;
}
origin: Tirasa/ConnId

/**
 * Get the resource as a byte array.
 *
 * @param clazz
 * @param res
 * @return
 */
public static byte[] getResourceAsBytes(final Class<?> clazz, final String res) {
  assert clazz != null && StringUtil.isNotBlank(res);
  // copy bytes from the stream to an array..
  final InputStream ins = getResourceAsStream(clazz, res);
  if (ins == null) {
    throw new IllegalStateException("Resource not found: " + res);
  }
  final byte[] ret = inputStreamToBytes(ins);
  quietClose(ins);
  return ret;
}
org.identityconnectors.commonIOUtilinputStreamToBytes

Javadoc

Takes a 'InputStream' and returns a byte array.

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.
  • getResourceAsString
    Read the entire stream into a String and return it.
  • 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.
  • getResourceAsStream,
  • getResourcePath,
  • readFileBytes,
  • storePropertiesFile,
  • makeURL

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Menu (java.awt)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top Sublime Text plugins
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