| 35 | /** |
| 36 | */ |
| 37 | public class LogSimple implements LogStream { |
| 38 | |
| 39 | private final PrintStream mStream; |
| 40 | |
| 41 | /** |
| 42 | * @param stream which is being wrapped by this class. |
| 43 | */ |
| 44 | public LogSimple(final PrintStream stream) { |
| 45 | if (stream == null) { |
| 46 | throw new NullPointerException(); |
| 47 | } |
| 48 | mStream = stream; |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public void close() { |
| 53 | if (mStream != System.err) { |
| 54 | mStream.close(); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | @Override |
| 59 | public void removeLog() { |
| 60 | close(); |
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | public PrintStream stream() { |
| 65 | return mStream; |
| 66 | } |
| 67 | |
| 68 | @Override |
| 69 | public File file() { |
| 70 | return null; |
| 71 | } |
| 72 | |
| 73 | @Override |
| 74 | public String toString() { |
| 75 | return "LogSimple"; |
| 76 | } |
| 77 | |
| 78 | } |
| 79 |
nothing calls this directly
no outgoing calls
no test coverage detected