List of usage examples for java.lang System err
PrintStream err
To view the source code for java.lang System err.
Click Source Link
From source file:iTextVersion.java
public static void main(String[] args) { Document document = new Document(); try {/*from ww w .j av a2 s . co m*/ PdfWriter.getInstance(document, new FileOutputStream("Version.pdf")); document.open(); document.add(new Paragraph("This page was made using " + Document.getVersion())); } catch (Exception ioe) { System.err.println(ioe.getMessage()); } document.close(); }
From source file:ImageScalingPercentTwoAxisPDF.java
public static void main(String[] args) { Document document = new Document(); try {//w w w .j a v a2 s .co m PdfWriter.getInstance(document, new FileOutputStream("ImageScalingPercentTwoAxisPDF.pdf")); document.open(); Image png = Image.getInstance("logo.png"); png.scalePercent(100, 50); document.add(png); } catch (Exception e) { System.err.println(e.getMessage()); } document.close(); }
From source file:MainClass.java
public static void main(String[] args) throws Exception { Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream("2.pdf")); document.open();// ww w . j ava 2 s.c o m BaseFont bf = BaseFont.createFont("esl_gothic_unicode.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); Font font = new Font(bf, 12); System.err.println(bf.getClass().getName()); document.add(new Paragraph("this is a test.", font)); document.add(new Paragraph("\ue70a\ue70a\ue70a\ue70a\ue70a\ue70a ", font)); document.close(); }
From source file:PhraseInaChunkPDF.java
public static void main(String[] args) { Document document = new Document(); try {/*w w w. java 2s .co m*/ PdfWriter.getInstance(document, new FileOutputStream("PhraseInaChunkPDF.pdf")); document.open(); Phrase phrase = new Phrase(new Chunk("this is a phrase in a chunk\n")); document.add(phrase); } catch (Exception ioe) { System.err.println(ioe.getMessage()); } document.close(); }
From source file:DynaBeansExampleV1.java
public static void main(String args[]) throws Exception { Object movie = createMovieBean(); System.err.println(BeanUtils.getProperty(movie, "title")); System.err.println(BeanUtils.getProperty(movie, "director.name")); }
From source file:DefaultPageSizeA4PDF.java
public static void main(String[] args) { Document document = new Document(); try {//w w w. j ava 2 s. co m PdfWriter.getInstance(document, new FileOutputStream("DefaultPageSizeA4PDF.pdf")); document.open(); document.add(new Paragraph("The default PageSize is DIN A4.")); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } document.close(); }
From source file:MultiKeyExampleV2.java
public static void main(String args[]) { codeAndLangToText = new HashMap(); addMultiKeyAndValue("en", "GM", "Good Morning"); addMultiKeyAndValue("en", "GE", "Good Evening"); addMultiKeyAndValue("en", "GN", "Good Night"); addMultiKeyAndValue("de", "GM", "Guten Morgen"); addMultiKeyAndValue("de", "GE", "Guten Abend"); addMultiKeyAndValue("de", "GN", "Guten Nacht"); System.err.println("Good Evening in English: " + codeAndLangToText.get(new MultiKey("en", "GE"))); System.err.println("Good Night in German: " + codeAndLangToText.get(new MultiKey("de", "GN"))); }
From source file:Main.java
public static void main(String[] args) { Path rn_demo = Paths.get("C:/tutorial/Java", "demo.txt"); //using NIO.2 unbuffered stream int n;// w w w. j a va 2 s. c o m try (InputStream in = Files.newInputStream(rn_demo)) { while ((n = in.read()) != -1) { System.out.print((char) n); } } catch (IOException e) { System.err.println(e); } }
From source file:Resource.java
/** * @param args//from w ww.j a v a 2 s. c om */ public static void main(String[] args) { // TODO Auto-generated method stub ClassLoader cl = Thread.currentThread().getContextClassLoader(); InputStream is = cl.getResourceAsStream("com/sap/ca/aspose/license/Aspose.Total.Java.lic"); //InputStream is = cl.getResourceAsStream("com/sap/ca/aspose/license/a.txt"); if (is == null) { System.err.println("Error is is null"); System.exit(1); } String s; try { s = IOUtils.toString(is); System.out.println(s); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
From source file:ApplicationWindowManager.java
public static void main(String[] args) { MainWindow main = new MainWindow(); MainWindow main2 = new MainWindow(); WindowManager wm = new WindowManager(); wm.add(main);/*from ww w . j av a2s.c o m*/ wm.add(main2); if (!wm.close()) { System.err.println("Windows failed to close"); } }