MCPcopy Index your code
hub / github.com/processing/processing / sendFile

Method sendFile

app/src/processing/app/WebServer.java:445–455  ·  view source on GitHub ↗
(File targ, PrintStream ps)

Source from the content-addressed store, hash-verified

443
444
445 void sendFile(File targ, PrintStream ps) throws IOException {
446 InputStream is = null;
447 ps.write(EOL);
448 if (targ.isDirectory()) {
449 listDirectory(targ, ps);
450 return;
451 } else {
452 is = new FileInputStream(targ.getAbsolutePath());
453 }
454 sendFile(is, ps);
455 }
456
457
458 void sendFile(InputStream is, PrintStream ps) throws IOException {

Callers 1

handleClientMethod · 0.95

Calls 4

listDirectoryMethod · 0.95
writeMethod · 0.65
readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected