FileDocCategorySizeDatePackage
ConstructedOctetStream.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1398Wed Oct 01 10:55:30 BST 2008org.bouncycastle.sasn1

ConstructedOctetStream

public class ConstructedOctetStream extends InputStream
deprecated
use corresponding classes in org.bouncycastle.asn1.

Fields Summary
private final Asn1InputStream
_aIn
private boolean
_first
private InputStream
_currentStream
Constructors Summary
ConstructedOctetStream(InputStream in)

    
    
         
    
        _aIn = new Asn1InputStream(in);
    
Methods Summary
public intread()

        if (_first)
        {
            Asn1OctetString s = (Asn1OctetString)_aIn.readObject();
    
            if (s == null)
            {
                return -1;
            }
            
            _first = false;
            _currentStream = s.getOctetStream();
        }
        else if (_currentStream == null)
        {
            return -1;
        }
            
        int b = _currentStream.read();
    
        if (b < 0)
        {
            Asn1OctetString s = (Asn1OctetString)_aIn.readObject();
            
            if (s == null)
            {
                _currentStream = null;
                
                return -1;
            }
            
            _currentStream = s.getOctetStream();
            
            return _currentStream.read();
        }
        else
        {
            return b;
        }