MCPcopy Index your code
hub / github.com/arduino/Arduino / createInput

Method createInput

arduino-core/src/processing/app/legacy/PApplet.java:563–579  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

561 }
562
563 static public InputStream createInput(File file) {
564 if (file == null) {
565 throw new IllegalArgumentException("File passed to createInput() was null");
566 }
567 try {
568 InputStream input = new FileInputStream(file);
569 if (file.getName().toLowerCase().endsWith(".gz")) {
570 return new GZIPInputStream(input);
571 }
572 return input;
573
574 } catch (IOException e) {
575 System.err.println("Could not createInput() for " + file);
576 e.printStackTrace();
577 return null;
578 }
579 }
580
581 /**
582 * Returns a path inside the applet folder to save to. Like sketchPath(),

Callers 1

loadStringsMethod · 0.95

Calls 2

printStackTraceMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected