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
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 void
close()
void
flush()
void
format(String fmt, 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(Object any)
Print an object's toString representationsvoid
println()
Print a platform dependent new linevoid
println(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 IOException
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
println
public void println(String s) throws IOException
Print a string and terminate with a line feed.- Parameters:
s
- aString
object.- Throws:
IOException
-
println
public void println() throws IOException
Print a platform dependent new line- Throws:
IOException
-
print
public void print(char value) throws IOException
Print a char- Parameters:
value
- a char.- Throws:
IOException
-
print
public void print(int value) throws IOException
Print an int as string- Parameters:
value
- an int.- Throws:
IOException
-
print
public void print(long value) throws IOException
Print a long as string- Parameters:
value
- a long.- Throws:
IOException
-
print
public void print(short value) throws IOException
Print 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
- aString
object.args
- objects.- Throws:
IOException
-
print
public void print(Object any) throws IOException
Print an object's toString representations- Parameters:
any
- an object.- Throws:
IOException
-
-