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 TypeMethodDescriptionvoid
close()
void
flush()
void
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 an object's toString representationsvoid
println()
Print a platform dependent new linevoid
Print a string and terminate with a line feed.void
write
(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:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
println
Print a string and terminate with a line feed.- Parameters:
s
- aString
object.- 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
- aString
object.args
- objects.- Throws:
IOException
-
print
Print an object's toString representations- Parameters:
any
- an object.- Throws:
IOException
-