API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. PrintStream View Source
Author(s)
Frank Yellin
Mark Reinhold
Since
JDK1.0
Version
1.40, 06/06/28
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              PrintStream
Implements
 Appendable
 Closeable
Subclasses
Description
public class PrintStream
  A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.
See also:   
Constructors
private PrintStream (boolean autoFlush, OutputStream out)
public PrintStream (File file) throws FileNotFoundException
  Creates a new print stream, without automatic line flushing, with the specified file.
public PrintStream (File file, String csn) throws FileNotFoundException UnsupportedEncodingException
  Creates a new print stream, without automatic line flushing, with the specified file and charset.
public PrintStream (OutputStream out)
  Creates a new print stream.
public PrintStream (OutputStream out, boolean autoFlush)
  Creates a new print stream.
public PrintStream (OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException
  Creates a new print stream.
public PrintStream (String fileName) throws FileNotFoundException
  Creates a new print stream, without automatic line flushing, with the specified file name.
public PrintStream (String fileName, String csn) throws FileNotFoundException UnsupportedEncodingException
  Creates a new print stream, without automatic line flushing, with the specified file name and charset.
Methods
Hide/Show inherited methods
public PrintStream append (char c) [Specified in Appendable]
  Appends the specified character to this output stream.
public PrintStream append (CharSequence csq) [Specified in Appendable]
  Appends the specified character sequence to this output stream.
public PrintStream append (CharSequence csq, int start, int end) [Specified in Appendable]
  Appends a subsequence of the specified character sequence to this output stream.
public boolean checkError ()
  Flushes the stream and checks its error state.
protected void clearError ()
  Clears the internal error state of this stream.
public void close () [Overrides FilterOutputStream] [Specified in Closeable]
  Closes the stream.
public void flush () [Overrides FilterOutputStream]
  Flushes the stream.
public PrintStream format (Locale l, String format, Object args)
  Writes a formatted string to this output stream using the specified format string and arguments.
public PrintStream format (String format, Object args)
  Writes a formatted string to this output stream using the specified format string and arguments.
public void print (boolean b)
  Prints a boolean value.
public void print (char c)
  Prints a character.
public void print (char[] s)
  Prints an array of characters.
public void print (double d)
  Prints a double-precision floating-point number.
public void print (float f)
  Prints a floating-point number.
public void print (int i)
  Prints an integer.
public void print (long l)
  Prints a long integer.
public void print (Object obj)
  Prints an object.
public void print (String s)
  Prints a string.
public PrintStream printf (Locale l, String format, Object args)
  A convenience method to write a formatted string to this output stream using the specified format string and arguments.
public PrintStream printf (String format, Object args)
  A convenience method to write a formatted string to this output stream using the specified format string and arguments.
public void println ()
  Terminates the current line by writing the line separator string.
public void println (boolean x)
  Prints a boolean and then terminate the line.
public void println (char x)
  Prints a character and then terminate the line.
public void println (char[] x)
  Prints an array of characters and then terminate the line.
public void println (double x)
  Prints a double and then terminate the line.
public void println (float x)
  Prints a float and then terminate the line.
public void println (int x)
  Prints an integer and then terminate the line.
public void println (long x)
  Prints a long and then terminate the line.
public void println (Object x)
  Prints an Object and then terminate the line.
public void println (String x)
  Prints a String and then terminate the line.
protected void setError ()
  Sets the error state of the stream to true.
public void write (byte[] b) throws IOException [Inherited From FilterOutputStream]
  Writes b.length bytes to this output stream.
public void write (byte[] buf, int off, int len) [Overrides FilterOutputStream]
  Writes len bytes from the specified byte array starting at offset off to this stream.
public void write (int b) [Overrides FilterOutputStream] [Specified in OutputStream]
  Writes the specified byte to this stream.
Fields
Hide/Show inherited fields
protected OutputStream out [Inherited From FilterOutputStream]
The underlying output stream to be filtered.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar