/** * @deprecated as of 1.349 * Use {@link #NULL} */ @Deprecated public StreamTaskListener() throws IOException { this(new NullStream()); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { org.apache.commons.io.IOUtils.copy(in, new NullStream()); in.close(); }
/** * Returns true if the executable exists. */ public boolean getExists() { try { return getExecutable(new LocalLauncher(new StreamTaskListener(new NullStream())))!=null; } catch (IOException | InterruptedException e) { return false; } }
public OutputStream openLogFile() { try { log.rewind(); return log; } catch (IOException e) { logger.log(Level.SEVERE, "Failed to create log file "+getLogFile(),e); return new NullStream(); } }
/** * Checks if "java" is in PATH on the given node. * * <p> * If it's not, then the user must specify a configured JDK, * so this is often useful for form field validation. */ public static boolean isDefaultJDKValid(Node n) { try { TaskListener listener = new StreamTaskListener(new NullStream()); Launcher launcher = n.createLauncher(listener); return launcher.launch().cmds("java","-fullversion").stdout(listener).join()==0; } catch (IOException e) { return false; } catch (InterruptedException e) { return false; } }
/** * @deprecated as of 1.349 Use {@link #NULL} */ public StreamTaskListener() throws IOException { this(new NullStream()); }
/** * @deprecated as of 1.349 * Use {@link #NULL} */ public StreamTaskListener() throws IOException { this(new NullStream()); }
/** * @deprecated as of 1.349 * Use {@link #NULL} */ public StreamTaskListener() throws IOException { this(new NullStream()); }
/** * @deprecated as of 1.349 * Use {@link #NULL} */ public StreamTaskListener() throws IOException { this(new NullStream()); }
private void startConcealing() { this.out = new NullStream(); }
private void startConcealing() { this.out = new NullStream(); }
/** * @deprecated as of 1.349 * Use {@link #NULL} */ @Deprecated public StreamTaskListener() throws IOException { this(new NullStream()); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { org.apache.commons.io.IOUtils.copy(in, new NullStream()); in.close(); }
@Before public void dontPrintExceptions() { // get rid of the stack trace prints for expected exceptions System.setErr(new PrintStream(new NullStream())); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { copy(in,new NullStream()); in.close(); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { copy(in,new NullStream()); in.close(); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { copy(in, new NullStream()); in.close(); }
/** * Drains the input stream and closes it. */ public static void drain(InputStream in) throws IOException { copy(in,new NullStream()); in.close(); }
/** * Returns true if the executable exists. */ public boolean getExists() { try { return getExecutable(new LocalLauncher(new StreamTaskListener(new NullStream())))!=null; } catch (IOException | InterruptedException e) { return false; } }
/** * Returns true if the executable exists. */ public boolean getExists() { try { return getExecutable(new LocalLauncher(new StreamTaskListener(new NullStream())))!=null; } catch (IOException e) { return false; } catch (InterruptedException e) { return false; } }