class ShowProperties { public static void main(String[] args) { System.getProperties().list(System.out); } }
public void list(PrintStream out) { delegate.list(out); }
public void list(PrintWriter out) { delegate.list(out); }
@Override public void addToArchive( Path archiveDestination, DiagnosticsReporterProgress progress ) throws IOException { try ( PrintStream printStream = new PrintStream( Files.newOutputStream( archiveDestination ) ) ) { systemProperties.list( printStream ); } }
@Override public synchronized void list( PrintWriter out ) { super.putAll( storageMap ); super.list( out ); super.clear(); }
@Override public synchronized void list( PrintStream out ) { super.putAll( storageMap ); super.list( out ); super.clear(); }
public static String getPropertyAsString(Properties prop) { StringWriter writer = new StringWriter(); prop.list(new PrintWriter(writer)); return writer.getBuffer().toString(); }
private static String getPropertyAsString(Properties prop) { StringWriter writer = new StringWriter(); prop.list(new PrintWriter(writer)); return writer.getBuffer().replace(0, "-- listing properties --\n".length(), "").toString(); }
public void list(PrintStream out) { getDelegate().list(out); }
public void list(PrintWriter out) { getDelegate().list(out); }
public static void writeProperties(File f, Properties p) { PrintWriter pw = null; try { pw = new PrintWriter(f); p.list(pw); } catch (Exception e) { } finally { close(pw); } } }
public static void writeProperties(File f, Properties p) { PrintWriter pw = null; try { pw = new PrintWriter(f); p.list(pw); } catch (Exception e) { } finally { close(pw); } } }
public static void writeProperties(File f, Properties p) { PrintWriter pw = null; try { pw = new PrintWriter(f); p.list(pw); } catch (Exception e) { } finally { close(pw); } } }
public static void writeProperties(File f, Properties p) { PrintWriter pw = null; try { pw = new PrintWriter(f); p.list(pw); } catch (Exception e) { } finally { close(pw); } } }
public static void writeProperties(File f, Properties p) { PrintWriter pw = null; try { pw = new PrintWriter(f); p.list(pw); } catch (Exception e) { } finally { close(pw); } } }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text"); PrintWriter out = resp.getWriter(); ClassLoader cl = getClass().getClassLoader(); out.append("CLASS LOADER:\n\n"); out.append("Name: ").append(cl != null ? cl.getClass().getName() : null).append('\n'); if (cl instanceof URLClassLoader) { URLClassLoader urlCl = (URLClassLoader) cl; out.append("Urls: ").append('\n'); for (URL url : urlCl.getURLs()) { out.append(url.toString()).append('\n'); } } out.append("\nENVIRONMENT VARIABLES:\n\n"); Map<String, String> envVars = System.getenv(); for (Map.Entry<String, String> entry : envVars.entrySet()) { out.append(entry.getKey()).append("=").append(entry.getValue()).append('\n'); } out.append("\n\nSYSTEM PROPERTIES:\n\n"); System.getProperties().list(out); out.close(); } }
} catch (IOException ex) { log("failed to log unshortened properties"); lnks.list(new PrintStream( new LogOutputStream(this, Project.MSG_INFO)));
public static String list(Properties properties) { UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = new UnsyncByteArrayOutputStream(); PrintStream printStream = new PrintStream(unsyncByteArrayOutputStream); properties.list(printStream); return unsyncByteArrayOutputStream.toString(); }