1 29 30 package com.caucho.vfs; 31 32 import java.io.IOException ; 33 34 37 public class StderrStream extends StreamImpl { 38 private static StderrStream _stderr; 39 40 private StderrStream() 41 { 42 } 43 44 47 public static StderrStream create() 48 { 49 if (_stderr == null) { 50 _stderr = new StderrStream(); 51 ConstPath path = new ConstPath(null, _stderr); 52 path.setScheme("stderr"); 53 _stderr.setPath(path); 54 } 55 56 return _stderr; 57 } 58 59 62 public boolean canWrite() 63 { 64 return true; 65 } 66 67 75 public void write(byte []buf, int offset, int length, boolean isEnd) 76 throws IOException 77 { 78 System.err.write(buf, offset, length); 79 System.err.flush(); 80 } 81 } 82 | Popular Tags |