edu.wisc.ssec.mcidasv.jython
Class OutputStreamDemux
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
edu.wisc.ssec.mcidasv.jython.OutputStreamDemux
- All Implemented Interfaces:
- Closeable, Flushable
public class OutputStreamDemux
- extends ByteArrayOutputStream
type
private OutputStreamDemux.OutputType type
streamMap
private final Map<String,ByteArrayOutputStream> streamMap
interpreterMap
private final Map<String,Interpreter> interpreterMap
consoleMap
private final Map<String,Console> consoleMap
OutputStreamDemux
public OutputStreamDemux()
id
private static String id()
addStream
public void addStream(Console console,
Interpreter interpreter,
OutputStreamDemux.OutputType type)
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class ByteArrayOutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
- Overrides:
write
in class ByteArrayOutputStream
write
public void write(int b)
- Overrides:
write
in class ByteArrayOutputStream
reset
public void reset()
- Overrides:
reset
in class ByteArrayOutputStream
size
public int size()
- Overrides:
size
in class ByteArrayOutputStream
toByteArray
public byte[] toByteArray()
- Overrides:
toByteArray
in class ByteArrayOutputStream
toString
@Deprecated
public String toString(int hibyte)
- Deprecated.
- Overrides:
toString
in class ByteArrayOutputStream
toString
public String toString(String charsetName)
throws UnsupportedEncodingException
- Overrides:
toString
in class ByteArrayOutputStream
- Throws:
UnsupportedEncodingException
writeTo
public void writeTo(OutputStream out)
throws IOException
- Overrides:
writeTo
in class ByteArrayOutputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class ByteArrayOutputStream