All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spongycastle.x509.X509StreamParserSpi Maven / Gradle / Ivy

Go to download

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.7.

There is a newer version: 1.47.0.3
Show newest version
package org.spongycastle.x509;

import org.spongycastle.x509.util.StreamParsingException;

import java.io.InputStream;
import java.util.Collection;

/**
 * This abstract class defines the service provider interface (SPI) for
 * X509StreamParser.
 *
 * @see org.spongycastle.x509.X509StreamParser
 *
 */
public abstract class X509StreamParserSpi
{
    /**
     * Initializes this stream parser with the input stream.
     *
     * @param in The input stream.
     */
    public abstract void engineInit(InputStream in);

    /**
     * Returns the next X.509 object of the type of this SPI from the given
     * input stream.
     *
     * @return the next X.509 object in the stream or null if the
     *         end of the stream is reached.
     * @exception StreamParsingException
     *                if the object cannot be created from input stream.
     */
    public abstract Object engineRead() throws StreamParsingException;

    /**
     * Returns all X.509 objects of the type of this SPI from
     * the given input stream.
     *
     * @return A collection of all X.509 objects in the input stream or
     *         null if the end of the stream is reached.
     * @exception StreamParsingException
     *                if an object cannot be created from input stream.
     */
    public abstract Collection engineReadAll() throws StreamParsingException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy