summaryrefslogtreecommitdiff
path: root/bcprov/src/main/java/org/bouncycastle/asn1/ASN1Generator.java
blob: a9b9f5ba5600ac28555215719fa1aed942387970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.bouncycastle.asn1;

import java.io.OutputStream;

/**
 * Basic class for streaming generators.
 */
public abstract class ASN1Generator
{
    // TODO This is problematic if we want an isolating buffer for all ASN.1 writes
    protected OutputStream _out;

    /**
     * Base constructor.
     *
     * @param out
     *            the end output stream that object encodings are written to.
     */
    public ASN1Generator(OutputStream out)
    {
        _out = out;
    }

    /**
     * Return the actual stream object encodings are written to.
     *
     * @return the stream that is directly encoded to.
     */
    public abstract OutputStream getRawOutputStream();
}