Package org.eclipse.jgit.util.io
Class ThrowingPrintWriter
java.lang.Object
java.io.Writer
org.eclipse.jgit.util.io.ThrowingPrintWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
An alternative PrintWriter that doesn't catch exceptions.
- Since:
- 2.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()voidPrint 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 an object's toString representationsvoidprintln()Print a platform dependent new linevoidPrint a string and terminate with a line feed.voidwrite(char[] cbuf, int off, int len)
-
Field Details
-
out
-
LF
-
-
Constructor Details
-
ThrowingPrintWriter
Construct a JGitPrintWriter- Parameters:
out- the underlyingWriter
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
println
Print a string and terminate with a line feed.- Parameters:
s- aStringobject.- Throws:
IOException
-
println
Print a platform dependent new line- Throws:
IOException
-
print
Print a char- Parameters:
value- a char.- Throws:
IOException
-
print
Print an int as string- Parameters:
value- an int.- Throws:
IOException
-
print
Print a long as string- Parameters:
value- a long.- Throws:
IOException
-
print
Print a short as string- Parameters:
value- a short.- Throws:
IOException
-
format
Print a formatted message according toString.format(String, Object...).- Parameters:
fmt- aStringobject.args- objects.- Throws:
IOException
-
print
Print an object's toString representations- Parameters:
any- an object.- Throws:
IOException
-