1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 1999-2006, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  
11  package ch.qos.logback.classic.net;
12  
13  import java.io.IOException;
14  import java.io.OutputStream;
15  
16  public class NOPOutputStream extends OutputStream {
17  
18    long count;
19  
20    @Override
21    public void write(int b) throws IOException {
22      count++;
23      // do nothing
24    }
25  
26    public long getCount() {
27      return count;
28    }
29  
30    public long size() {
31      return count;
32    }
33  
34    
35    public void reset() {
36      count = 0;
37    }
38  
39  }