Name

java.io.PrintStream

Synopsis

This class is slightly modified from the J2SE class of the same name. The PrintStream class outputs textual representations of various data. Note that the PrintStream never throws an IOException, unlike other streams. Instead, you should use the checkError() method to determine if an exceptional condition has occurred.

public classPrintStream {

   // constructor
   public PrintStream(OutputStream out);
   // protected instance methods
   protected void setError();

   // public instance methods
   public boolean checkError();
   public void close();
   public void flush();
   public void print(boolean b);
   public void print(char c);
   public void print(char[] s);
   public void print(int i);
   public void print(long l);
   public void print(Object obj);
   public void print(String s);
   public void println();
   public void println(boolean x);
   public void println(char x);
   public void println(char[] x);
   public void println(int x);
   public void println(long x);
   public void println(Object x);
   public void println(String x);
   public void write(int b);
   public void write(byte[] buf, int off, int len);
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.