Package org.eclipse.jgit.util.io
Class ThrowingPrintWriter
- java.lang.Object
-
- java.io.Writer
-
- org.eclipse.jgit.util.io.ThrowingPrintWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class ThrowingPrintWriter extends java.io.Writer
An alternative PrintWriter that doesn't catch exceptions.- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description ThrowingPrintWriter(java.io.Writer out)
Construct a JGitPrintWriter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
format(java.lang.String fmt, java.lang.Object... args)
Print a formatted message according toString.format(String, Object...)
.void
print(char value)
Print a charvoid
print(int value)
Print an int as stringvoid
print(long value)
Print a long as stringvoid
print(short value)
Print a short as stringvoid
print(java.lang.Object any)
Print an object's toString representationsvoid
println()
Print a platform dependent new linevoid
println(java.lang.String s)
Print a string and terminate with a line feed.void
write(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOException
- Specified by:
write
in classjava.io.Writer
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classjava.io.Writer
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.io.Writer
- Throws:
java.io.IOException
-
println
public void println(java.lang.String s) throws java.io.IOException
Print a string and terminate with a line feed.- Parameters:
s
-- Throws:
java.io.IOException
-
println
public void println() throws java.io.IOException
Print a platform dependent new line- Throws:
java.io.IOException
-
print
public void print(char value) throws java.io.IOException
Print a char- Parameters:
value
-- Throws:
java.io.IOException
-
print
public void print(int value) throws java.io.IOException
Print an int as string- Parameters:
value
-- Throws:
java.io.IOException
-
print
public void print(long value) throws java.io.IOException
Print a long as string- Parameters:
value
-- Throws:
java.io.IOException
-
print
public void print(short value) throws java.io.IOException
Print a short as string- Parameters:
value
-- Throws:
java.io.IOException
-
format
public void format(java.lang.String fmt, java.lang.Object... args) throws java.io.IOException
Print a formatted message according toString.format(String, Object...)
.- Parameters:
fmt
-args
-- Throws:
java.io.IOException
-
print
public void print(java.lang.Object any) throws java.io.IOException
Print an object's toString representations- Parameters:
any
-- Throws:
java.io.IOException
-
-