java.io.PrintWriter

E937651

java.io.PrintWriter is a character-based output stream class in Java that provides convenient methods for writing formatted text data to various destinations such as files, network connections, or in-memory buffers.

All labels observed (2)

Label Occurrences
PrintWriter(String fileName) 1
java.io.PrintWriter canonical 1

How this entity was disambiguated

Statements (72)

Predicate Object
instanceOf Java class
character-based output stream
autoFlushBehavior flushes on format when autoFlush is true
flushes on printf when autoFlush is true
flushes on println when autoFlush is true
belongsTo Java Platform, Standard Edition
commonUsage writing HTTP responses in servlets
writing logs
writing text files
designGoal avoid throwing IOExceptions on most methods
provide convenient text output methods
documentedIn Java SE API documentation
encodingControl can use specified charset when constructed with file name and charset
uses platform default charset when constructed with OutputStream
errorHandling exposes error state via checkError()
records I/O errors internally
extends java.io.Writer
hasConstructor PrintWriter(File file)
PrintWriter(File file, String csn)
PrintWriter(OutputStream out)
PrintWriter(OutputStream out, boolean autoFlush)
PrintWriter(String fileName)
linked to: java.io.PrintWriter

PrintWriter(String fileName, String csn)
PrintWriter(Writer out)
PrintWriter(Writer out, boolean autoFlush)
hasMethod append(CharSequence csq)
append(CharSequence csq, int start, int end)
append(char c)
checkError()
close()
flush()
format(String format, Object... args)
print(Object obj)
print(String s)
print(boolean b)
print(char c)
print(char[] s)
print(double d)
print(float f)
print(int i)
print(long l)
printf(String format, Object... args)
println()
println(Object x)
println(String x)
println(boolean x)
println(char x)
println(char[] x)
println(double x)
println(float x)
println(int x)
println(long x)
write(String s, int off, int len)
write(char[] buf, int off, int len)
write(int c)
package java.io
since JDK 1.1
supports append operations
auto flushing
character output
formatted output
line-based output
printf-style formatting
text output
writing to OutputStream
writing to StringBuffer
writing to StringBuilder
writing to Writer
writing to files
writing to in-memory buffers
writing to network connections via streams
threadSafety not guaranteed to be thread-safe

How these facts were elicited

Referenced by (2)

Full triples — surface form annotated when it differs from this entity's canonical label.

DriverManager loggingTarget java.io.PrintWriter
java.io.PrintWriter hasConstructor PrintWriter(String fileName)
linked to: java.io.PrintWriter