Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1
Class BEROctetStringGenerator

    java.lang.Object
      org.bouncycastle.asn1.ASN1Generator
          org.bouncycastle.asn1.BERGenerator
              org.bouncycastle.asn1.BEROctetStringGenerator

public class BEROctetStringGenerator
extends BERGenerator

A generator for indefinite-length OCTET STRINGs

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Generator
`_out`

Constructor Summary
`BEROctetStringGenerator(java.io.OutputStream out)` Use the passed in stream as the target for the generator, writing out the header tag for a constructed OCTET STRING.
`BEROctetStringGenerator(java.io.OutputStream out, int tagNo, boolean isExplicit)` Use the passed in stream as the target for the generator, writing out the header tag for a tagged constructed OCTET STRING (possibly implicit).

Method Summary
`java.io.OutputStream` | `getOctetOutputStream()` Return a stream representing the content target for this OCTET STRING
`java.io.OutputStream` | `getOctetOutputStream(byte[] buf)` Return a stream representing the content target for this OCTET STRING

Methods inherited from class org.bouncycastle.asn1.BERGenerator
`getRawOutputStream, writeBEREnd, writeBERHeader`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BEROctetStringGenerator

    public BEROctetStringGenerator(java.io.OutputStream out)
                            throws java.io.IOException

  Use the passed in stream as the target for the generator, writing out the header tag for a constructed OCTET STRING.

Parameters:
  `out` - target stream
Throws:
  `java.io.IOException` - if the target stream cannot be written to.

### BEROctetStringGenerator

    public BEROctetStringGenerator(java.io.OutputStream out,
                                   int tagNo,
                                   boolean isExplicit)
                            throws java.io.IOException

  Use the passed in stream as the target for the generator, writing out the header tag for a tagged constructed OCTET STRING (possibly implicit).

Parameters:
  `out` - target stream
  `tagNo` - the tag number to introduce
  `isExplicit` - true if this is an explicitly tagged object, false otherwise.
Throws:
  `java.io.IOException` - if the target stream cannot be written to.

Method Detail

### getOctetOutputStream

    public java.io.OutputStream getOctetOutputStream()

  Return a stream representing the content target for this OCTET STRING

  Returns:
    an OutputStream which chunks data in blocks of 1000 (CER limit).

### getOctetOutputStream

    public java.io.OutputStream getOctetOutputStream(byte[] buf)

  Return a stream representing the content target for this OCTET STRING

  Parameters:
    `buf` - the buffer to use for chunking the data.
  Returns:
    an OutputStream which chunks data in blocks of buf length.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD