org.eclipse.jgit.util.io
Class ThrowingPrintWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.eclipse.jgit.util.io.ThrowingPrintWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class ThrowingPrintWriter
extends java.io.Writer

An alternative PrintWriter that doesn't catch exceptions.

Since:
2.2

Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ThrowingPrintWriter(java.io.Writer out)
          Construct a JGitPrintWriter
 
Method Summary
 void close()
           
 void flush()
           
 void format(java.lang.String fmt, java.lang.Object... args)
          Print a formatted message according to String.format(String, Object...).
 void print(char value)
          Print a char
 void print(int value)
          Print an int as string
 void print(long value)
          Print a long as string
 void print(java.lang.Object any)
          Print an object's toString representations
 void print(short value)
          Print a short as string
 void println()
          Print a platform dependent new line
 void println(java.lang.String s)
          Print a string and terminate with a line feed.
 void write(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowingPrintWriter

public ThrowingPrintWriter(java.io.Writer out)
Construct a JGitPrintWriter

Parameters:
out - the underlying Writer
Method Detail

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Specified by:
write in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException

println

public void println(java.lang.String s)
             throws java.io.IOException
Print a string and terminate with a line feed.

Parameters:
s -
Throws:
java.io.IOException

println

public void println()
             throws java.io.IOException
Print a platform dependent new line

Throws:
java.io.IOException

print

public void print(char value)
           throws java.io.IOException
Print a char

Parameters:
value -
Throws:
java.io.IOException

print

public void print(int value)
           throws java.io.IOException
Print an int as string

Parameters:
value -
Throws:
java.io.IOException

print

public void print(long value)
           throws java.io.IOException
Print a long as string

Parameters:
value -
Throws:
java.io.IOException

print

public void print(short value)
           throws java.io.IOException
Print a short as string

Parameters:
value -
Throws:
java.io.IOException

format

public void format(java.lang.String fmt,
                   java.lang.Object... args)
            throws java.io.IOException
Print a formatted message according to String.format(String, Object...).

Parameters:
fmt -
args -
Throws:
java.io.IOException

print

public void print(java.lang.Object any)
           throws java.io.IOException
Print an object's toString representations

Parameters:
any -
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.