本文整理了Java中org.spongycastle.asn1.ASN1OctetString.getOctetStream()
方法的一些代码示例,展示了ASN1OctetString.getOctetStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1OctetString.getOctetStream()
方法的具体详情如下:
包路径:org.spongycastle.asn1.ASN1OctetString
类名称:ASN1OctetString
方法名:getOctetStream
[英]Return the content of the OCTET STRING as an InputStream.
[中]以InputStream的形式返回八位字节字符串的内容。
代码示例来源:origin: com.madgag.spongycastle/pkix
/**
* Return the uncompressed content.
*
* @param expanderProvider a provider of expander algorithm implementations.
* @return the uncompressed content
* @throws CMSException if there is an exception un-compressing the data.
*/
public byte[] getContent(InputExpanderProvider expanderProvider)
throws CMSException
{
ContentInfo content = comData.getEncapContentInfo();
ASN1OctetString bytes = (ASN1OctetString)content.getContent();
InputExpander expander = expanderProvider.get(comData.getCompressionAlgorithmIdentifier());
InputStream zIn = expander.getInputStream(bytes.getOctetStream());
try
{
return CMSUtils.streamToByteArray(zIn);
}
catch (IOException e)
{
throw new CMSException("exception reading compressed stream.", e);
}
}
代码示例来源:origin: com.madgag.spongycastle/bcpkix-jdk15on
/**
* Return the uncompressed content.
*
* @param expanderProvider a provider of expander algorithm implementations.
* @return the uncompressed content
* @throws CMSException if there is an exception un-compressing the data.
*/
public byte[] getContent(InputExpanderProvider expanderProvider)
throws CMSException
{
ContentInfo content = comData.getEncapContentInfo();
ASN1OctetString bytes = (ASN1OctetString)content.getContent();
InputExpander expander = expanderProvider.get(comData.getCompressionAlgorithmIdentifier());
InputStream zIn = expander.getInputStream(bytes.getOctetStream());
try
{
return CMSUtils.streamToByteArray(zIn);
}
catch (IOException e)
{
throw new CMSException("exception reading compressed stream.", e);
}
}
内容来源于网络,如有侵权,请联系作者删除!