Codota Logo
ResourceUtils.getStream
Code IndexAdd Codota to your IDE (free)

How to use
getStream
method
in
com.nexitia.emaginplatform.jfx.core.api.ResourceUtils

Best Java code snippets using com.nexitia.emaginplatform.jfx.core.api.ResourceUtils.getStream (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.nexitia.emaginplatform/emagin-core-api

 private static InputStream getFromStringContext(String path) {
  if(path.startsWith("classpath:")) {
   return getStream(path.split("classpath:")[1]);
  }
  return null;
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Get the single instance of icon reolver. When first time loading, it will search for spring bean
 * nammed 'IconDefinitionFiles", and will load all files inside it.
 */
public static ModelIconUtils instance() {
 if (instance == null) {
  instance = (ModelIconUtils) Services.getBean("ModelIconUtils");
  List<String> iconDefinitionFiles = (List<String>) Services.getBean("IconDefinitionFiles");
  for (String definition : iconDefinitionFiles) {
   Properties definitionMapping = new Properties();
   try (InputStream is = ResourceUtils.getStream(ModelIconUtils.class, definition)) {
    definitionMapping.load(is);
    instance.iconMapping.putAll(definitionMapping);
   } catch (Exception ex) {
    ex.printStackTrace();
   }
  }
 }
 return instance;
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-mobile-integration

 /**
  * Merge views definitions corresponding to this view. View must define at least one
  * wizardConfiguration.
  */
 @Override
 public VLViewConfigXML getConfigurationFile(final IEmaginController controller) {
  VLViewConfigXML finalResult = null;

  if(debug) {
   System.out.println("Searching for wiew : " + controller.getViewDefinitions().get(0));
  }

  String file = controller.getViewDefinitions().get(0);
  if(file.endsWith(".xml")) {
   throw new RuntimeException("Only Json configurration file is supported, given" + file);
  }

  if(debug) {
   System.out.println("### Searching for wiew : " + file);
  }

  Gson gson = new Gson();
  InputStream io = ResourceUtils.getStream(controller.getClass(), file);
  finalResult = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);

  return finalResult;
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-mobile-integration

try(InputStream io = ResourceUtils.getStream(getClass(), coreAttributes)){
 Gson gson1 = new Gson();
 VLViewConfigXML c  = gson1.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreComp)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreActions)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
try(InputStream io = ResourceUtils.getStream(getClass(), coreActionsModel)){
 Gson gson = new Gson();
 VLViewConfigXML c = gson.fromJson(new InputStreamReader(io), VLViewConfigXML.class);
origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components

/**
 * @{inheritedDoc}
 */
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
 NodeHelper.styleClassAddAll(this, configuration);
 try (InputStream is = ResourceUtils.getStream("/images/logo/EMAGIN_FX_WHITE.png")) {
  if(is != null) {
   final Image img = new Image(is, 200, 102, true, true);
   final ImageView imgView = new ImageView(img);
   // getChildren().add(imgView);
  }
 } catch (IOException e) {
  // e.printStackTrace();
 }
}
origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components

try (InputStream is = ResourceUtils.getStream("/images/logo/EMAGIN_FX_DEMOAPP_DARK.png")) {
 final Image img = new Image(is, 180, 180, true, true);
 final ImageView imgView = new ImageView(img);
com.nexitia.emaginplatform.jfx.core.apiResourceUtilsgetStream

Javadoc

Uses all possible methods to find out this resource.

Popular methods of ResourceUtils

  • getURL
    Get classpath url associated to resource with given path.
  • <init>
  • getFromStringContext

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now