Java IO Learning (24) printwriter (character print output stream)

Source: Internet
Author: User
Tags locale printf string format

PrintWriter Introduction

PrintWriter is a print output stream of character types that inherits from writer.

PrintStream is used to print the formatted representation of an object to the text output stream. It implements all the print methods in the PrintStream. It does not contain methods for writing raw bytes, which should be written with an encoded stream of bytes.

PrintWriter Function List

PrintWriter (OutputStream out) PrintWriter (OutputStream out, Boolean AutoFlush) PrintWriter (Writer wr) PrintWriter ( Writer wr, Boolean AutoFlush) printwriter (file file) printwriter (file file, string CSN) PrintWriter (string fileName) Print Writer (String fileName, string CSN) PrintWriter append (char c) printwriter append (charsequence csq, int star T, int end) PrintWriter append (Charsequence csq) boolean checkerror () void close () void flush () printwrite R Format (Locale L, string format, Object ... args) printwriter format (string format, Object ... args) void print (float fnum) void print (double dnum) void print (String str) void print (Object obj) void print (char ch) voi     D print (char[] chararray) void print (long lnum) void print (int inum) void print (Boolean bool) PrintWriter printf (Locale L, String format, Object ... args) printwriter printf (string format, Object ... args) void println () void println (float f) VOID println (int i) void println (long L) void println (Object obj) void println (char[] chars) void Printl N (String str) void println (char c) void println (double D) void println (Boolean b) void Write (char[) buf, I NT offset, int count) void write (int onechar) void write (char[] buf) void write (String str, int offset, int co unt) void write (String str)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.