public int available() { if(s is Tamir.Streams.PipedInputStream) { return ((Tamir.Streams.PipedInputStream)s).available(); } throw new Exception("JStream.available() -- Method not implemented"); }