01: package org.bouncycastle.openpgp;
02:
03: import java.io.IOException;
04: import java.io.OutputStream;
05:
06: class WrappedGeneratorStream extends OutputStream {
07: private final OutputStream _out;
08: private final StreamGenerator _sGen;
09:
10: public WrappedGeneratorStream(OutputStream out, StreamGenerator sGen) {
11: _out = out;
12: _sGen = sGen;
13: }
14:
15: public void write(byte[] bytes) throws IOException {
16: _out.write(bytes);
17: }
18:
19: public void write(byte[] bytes, int offset, int length)
20: throws IOException {
21: _out.write(bytes, offset, length);
22: }
23:
24: public void write(int b) throws IOException {
25: _out.write(b);
26: }
27:
28: public void flush() throws IOException {
29: _out.flush();
30: }
31:
32: public void close() throws IOException {
33: _sGen.close();
34: }
35: }
|