format()
printf()
. Public class PrintWriter extends Writer
Constructor | Description |
---|---|
PrintWriter(File file) | The function of this constructor is to create a print writer with represented file and without flushing automatically. |
PrintWriter(OutputStream out) | The function of this constructor is to create a print writer . |
PrintWriter(String fileName) | The function of this constructor is to create a print writer with represented file name and without flushing automatically. |
PrintWriter(OutputStream out, Boolean autoFlush) | The function of this constructor is to create a print writer with specified boolean auto flush. |
Method | Description |
---|---|
void close () | The function of this method is to close the present stream and associated to input stream systems resources are released without any impact. |
void flush () | The function of this method is to flush the specified output stream. |
void write (int c) | The function of this method is to write the represented character into output stream. |
void write (Char[] buf, int off, int n) | By using this method it writes the data up to 'n' bytes from the output stream to an array of characters. |
void println () | The function of this method is to terminate the present line. |
void print (object obj) | The function of this method is to return the object. |
void print(boolean b) | The function of this method is to the boolean value. |
printWriter append(Char c) | The function of this method is to append the represented character for the output stream. |