Package org.apache.uima.internal.util
Class EncodedPrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
org.apache.uima.internal.util.EncodedPrintStream
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Allow a
PrintStream
to specify an encoding.
This functionality is provided out of the box by the Java 1.4 version of
PrintStream
. This class is strictly for backwards compatibility.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionEncodedPrintStream
(OutputStream out, boolean autoFlush, String encoding) Constructor allows specifying a character encoding.EncodedPrintStream
(OutputStream out, String encoding) Constructor allows specifying a character encoding. -
Method Summary
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, setError, write, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
EncodedPrintStream
Constructor allows specifying a character encoding.Does not automatically flush the underlying output stream.
- Parameters:
out
- The underlying output stream.encoding
- String representation of a character encoding.- Throws:
UnsupportedEncodingException
- If the character encoding is not supported by the JVM.
-
EncodedPrintStream
public EncodedPrintStream(OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException Constructor allows specifying a character encoding.- Parameters:
out
- The underlying output stream.autoFlush
- SeePrintStream()
encoding
- String representation of a character encoding.- Throws:
UnsupportedEncodingException
- If the character encoding is not supported by the JVM.
-
-
Method Details
-
writeBytes
public final void writeBytes(byte[] bytes) - Overrides:
writeBytes
in classPrintStream
-
print
public void print(char c) - Overrides:
print
in classPrintStream
-
print
public void print(char[] s) - Overrides:
print
in classPrintStream
-
print
- Overrides:
print
in classPrintStream
-
println
public void println(char x) - Overrides:
println
in classPrintStream
-
println
public void println(char[] x) - Overrides:
println
in classPrintStream
-
println
- Overrides:
println
in classPrintStream
-