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

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • 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