patterntesting.runtime.io
Class BetterFileInputStream
java.lang.Object
java.io.InputStream
java.io.FileInputStream
patterntesting.runtime.io.BetterFileInputStream
- All Implemented Interfaces:
- Closeable
public final class BetterFileInputStream
- extends FileInputStream
Whenever you need a FileInputStream and want a better toString
implementation you can use the class BetterFileInputStream. "Better" means
that you see the name if the input file in the log which is much more helpful
than the default implementation of Object.toString(), especially for
logging and debugging.
- Since:
- 1.3.1 (14.09.2013)
- Author:
- oliver (boehm@javatux.de)
- See Also:
FileInputStream
|
Method Summary |
String |
toString()
This toString implementation reports the name of the input file which is
much more helpful than the default implementation of
Object.toString(), especially for logging and debugging. |
BetterFileInputStream
public BetterFileInputStream(String name)
throws FileNotFoundException
- Instantiates a new better file input stream.
- Parameters:
name - the name
- Throws:
FileNotFoundException - the file not found exception- See Also:
FileInputStream.FileInputStream(String)
BetterFileInputStream
public BetterFileInputStream(File file)
throws FileNotFoundException
- Instantiates a new better file input stream.
- Parameters:
file - the file
- Throws:
FileNotFoundException - the file not found exception- See Also:
FileInputStream.FileInputStream(File)
toString
public String toString()
- This toString implementation reports the name of the input file which is
much more helpful than the default implementation of
Object.toString(), especially for logging and debugging.
- Overrides:
toString in class Object
- Returns:
- the string
- See Also:
Object.toString()
Copyright © 2002–2014 PatternTesting Team. All rights reserved.