public class OutputStreamDemux extends ByteArrayOutputStream
Modifier and Type | Class and Description |
---|---|
protected static class |
OutputStreamDemux.OutputType |
Modifier and Type | Field and Description |
---|---|
private Map<String,Console> |
consoleMap |
private Map<String,Interpreter> |
interpreterMap |
private Map<String,ByteArrayOutputStream> |
streamMap |
private OutputStreamDemux.OutputType |
type |
buf, count
Constructor and Description |
---|
OutputStreamDemux() |
Modifier and Type | Method and Description |
---|---|
void |
addStream(Console console,
Interpreter interpreter,
OutputStreamDemux.OutputType type) |
void |
close() |
void |
flush() |
private static String |
id() |
void |
reset() |
int |
size() |
byte[] |
toByteArray() |
String |
toString() |
String |
toString(int hibyte)
Deprecated.
|
String |
toString(String charsetName) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeTo(OutputStream out) |
private OutputStreamDemux.OutputType type
private final Map<String,ByteArrayOutputStream> streamMap
private final Map<String,Interpreter> interpreterMap
private final Map<String,Console> consoleMap
public OutputStreamDemux()
public void addStream(Console console, Interpreter interpreter, OutputStreamDemux.OutputType type)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class ByteArrayOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len)
write
in class ByteArrayOutputStream
public void write(int b)
write
in class ByteArrayOutputStream
public void reset()
reset
in class ByteArrayOutputStream
public int size()
size
in class ByteArrayOutputStream
public byte[] toByteArray()
toByteArray
in class ByteArrayOutputStream
@Deprecated public String toString(int hibyte)
toString
in class ByteArrayOutputStream
public String toString(String charsetName) throws UnsupportedEncodingException
toString
in class ByteArrayOutputStream
UnsupportedEncodingException
public void writeTo(OutputStream out) throws IOException
writeTo
in class ByteArrayOutputStream
IOException
public String toString()
toString
in class ByteArrayOutputStream