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.WriterAn 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 voidclose()voidflush()voidformat(java.lang.String fmt, java.lang.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(java.lang.Object any)Print an object's toString representationsvoidprintln()Print a platform dependent new linevoidprintln(java.lang.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 java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
println
public void println(java.lang.String s) throws java.io.IOExceptionPrint a string and terminate with a line feed.- Parameters:
s- aStringobject.- Throws:
java.io.IOException
-
println
public void println() throws java.io.IOExceptionPrint a platform dependent new line- Throws:
java.io.IOException
-
print
public void print(char value) throws java.io.IOExceptionPrint a char- Parameters:
value- a char.- Throws:
java.io.IOException
-
print
public void print(int value) throws java.io.IOExceptionPrint an int as string- Parameters:
value- an int.- Throws:
java.io.IOException
-
print
public void print(long value) throws java.io.IOExceptionPrint a long as string- Parameters:
value- a long.- Throws:
java.io.IOException
-
print
public void print(short value) throws java.io.IOExceptionPrint a short as string- Parameters:
value- a short.- Throws:
java.io.IOException
-
format
public void format(java.lang.String fmt, java.lang.Object... args) throws java.io.IOExceptionPrint a formatted message according toString.format(String, Object...).- Parameters:
fmt- aStringobject.args- objects.- Throws:
java.io.IOException
-
print
public void print(java.lang.Object any) throws java.io.IOExceptionPrint an object's toString representations- Parameters:
any- an object.- Throws:
java.io.IOException
-
-