- java.lang.Object
-
- java.io.Writer
-
- org.eclipse.jgit.util.io.ThrowingPrintWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class ThrowingPrintWriter extends Writer
An alternative PrintWriter that doesn't catch exceptions.- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description ThrowingPrintWriter(Writer out)Construct a JGitPrintWriter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidformat(String fmt, Object... args)Print a formatted message according toString.format(String, Object...).voidprint(char value)Print a charvoidprint(int value)Print an int as stringvoidprint(long value)Print a long as stringvoidprint(short value)Print a short as stringvoidprint(Object any)Print an object's toString representationsvoidprintln()Print a platform dependent new linevoidprintln(String s)Print a string and terminate with a line feed.voidwrite(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
println
public void println(String s) throws IOException
Print a string and terminate with a line feed.- Parameters:
s- aStringobject.- Throws:
IOException
-
println
public void println() throws IOExceptionPrint a platform dependent new line- Throws:
IOException
-
print
public void print(char value) throws IOExceptionPrint a char- Parameters:
value- a char.- Throws:
IOException
-
print
public void print(int value) throws IOExceptionPrint an int as string- Parameters:
value- an int.- Throws:
IOException
-
print
public void print(long value) throws IOExceptionPrint a long as string- Parameters:
value- a long.- Throws:
IOException
-
print
public void print(short value) throws IOExceptionPrint a short as string- Parameters:
value- a short.- Throws:
IOException
-
format
public void format(String fmt, Object... args) throws IOException
Print a formatted message according toString.format(String, Object...).- Parameters:
fmt- aStringobject.args- objects.- Throws:
IOException
-
print
public void print(Object any) throws IOException
Print an object's toString representations- Parameters:
any- an object.- Throws:
IOException
-
-