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:
Closeable, Flushable, Appendable

public class ThrowingPrintWriter
extends 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(Writer out)
          Construct a JGitPrintWriter
 
Method Summary
 void close()
           
 void flush()
           
 void format(String fmt, 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(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(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(Writer out)
Construct a JGitPrintWriter

Parameters:
out - the underlying Writer
Method Detail

write

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

flush

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

close

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

println

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

Parameters:
s -
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 -
Throws:
IOException

print

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

Parameters:
value -
Throws:
IOException

print

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

Parameters:
value -
Throws:
IOException

print

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

Parameters:
value -
Throws:
IOException

format

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

Parameters:
fmt -
args -
Throws:
IOException

print

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

Parameters:
any -
Throws:
IOException


Copyright © 2013. All Rights Reserved.