/Users/lyon/j4p/src/javagroup/util/StandardErrorStream.java

1    /* 
2     * Copyright (C) 1997 Luke Gorrie 
3     * 
4     * This library is free software; you can redistribute it and/or 
5     * modify it under the terms of the GNU Library General Public 
6     * License as published by the Free Software Foundation; either 
7     * version 2 of the License, or (at your option) any later version. 
8     * 
9     * This library is distributed in the hope that it will be useful, 
10    * but WITHOUT ANY WARRANTY; without even the implied warranty of 
11    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12    * Library General Public License for more details. 
13    * 
14    * You should have received a copy of the GNU Library General Public 
15    * License along with this library; if not, write to the 
16    * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
17    * MA 02139, USA. 
18    */ 
19    
20   package javagroup.util; 
21    
22   import java.io.IOException; 
23   import java.io.OutputStream; 
24    
25   /** 
26    * Wrapper stream for redirecting calls to a Namespace-registered 
27    * counterpart. 
28    * 
29    * @author Luke Gorrie 
30    */ 
31   public class StandardErrorStream extends OutputStream { 
32    
33       public void write(int value) throws IOException { 
34           StandardIO.getInstance().getErr().write(value); 
35       } 
36    
37       public void write(byte[] value, int a, int b) throws IOException { 
38           StandardIO.getInstance().getErr().write(value, a, b); 
39       } 
40    
41   } 
42    
43