Code example for ByteArrayOutputStream

Methods: write

0
    } 
 
    @Override 
    public void write(byte[] b, int off, int len) throws IOException {
        os.write(b, off, len);
        copy.write(b, off, len);
    } 
 
    @Override 
    public void flush() throws IOException { 
        os.flush();
        copy.flush();
    } 
 
    @Override 
    public void close() throws IOException { 
        os.close();
        copy.close();
    } 
 
    public ByteArrayOutputStream getOutput() {