APIdia Launch Partner
Top Description Constructors Methods
sun.tools.common

public Class PrintStreamPrinter

extends Object
Class Inheritance
Imports
java.io.BufferedInputStream, .IOException, .InputStream, .InputStreamReader, .PrintStream, java.util.Arrays

A helper class which prints the content of input streams to print streams.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

The number of printed characters.
drainUTF8
(InputStream is, PrintStream ps)

Reads characters in UTF-8 format from the input stream and prints them with the given print stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PrintStreamPrinterback to summary
public PrintStreamPrinter()

Method Detail

drainUTF8back to summary
public static long drainUTF8(InputStream is, PrintStream ps) throws IOException

Reads characters in UTF-8 format from the input stream and prints them with the given print stream. Closes the input stream before it returns.

Returns:long

The number of printed characters.