本文整理了Java中org.bouncycastle.asn1.ASN1Primitive.encode()
方法的一些代码示例,展示了ASN1Primitive.encode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1Primitive.encode()
方法的具体详情如下:
包路径:org.bouncycastle.asn1.ASN1Primitive
类名称:ASN1Primitive
方法名:encode
[英]Return the length of the encoding this object will produce.
[中]返回此对象将产生的编码长度。
代码示例来源:origin: redfish64/TinyTravelTracker
void writeImplicitObject(ASN1Primitive obj)
throws IOException
{
if (obj != null)
{
obj.encode(new ImplicitOutputStream(os));
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
void writeImplicitObject(ASN1Primitive obj)
throws IOException
{
if (obj != null)
{
obj.encode(new ImplicitOutputStream(os));
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void writeObject(
Object obj)
throws IOException
{
if (obj == null)
{
writeNull();
}
else if (obj instanceof ASN1Primitive)
{
((ASN1Primitive)obj).encode(this);
}
else if (obj instanceof ASN1Encodable)
{
((ASN1Encodable)obj).toASN1Primitive().encode(this);
}
else
{
throw new IOException("object not BEREncodable");
}
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().toDERObject().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Write out an ASN.1 object.
*
* @param obj the object to be encoded.
* @throws IOException if there is an issue on encoding or output of the object.
*/
public void writeObject(
Object obj)
throws IOException
{
if (obj == null)
{
writeNull();
}
else if (obj instanceof ASN1Primitive)
{
((ASN1Primitive)obj).encode(this);
}
else if (obj instanceof ASN1Encodable)
{
((ASN1Encodable)obj).toASN1Primitive().encode(this);
}
else
{
throw new IOException("object not BEREncodable");
}
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().toDERObject().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().toDLObject().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public void writeObject(
ASN1Encodable obj)
throws IOException
{
if (obj != null)
{
obj.toASN1Primitive().toDLObject().encode(this);
}
else
{
throw new IOException("null object detected");
}
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Add an object to the SEQUENCE being generated.
*
* @param object an ASN.1 encodable object to add.
* @throws IOException if the target stream cannot be written to or the object cannot be encoded.
*/
public void addObject(
ASN1Encodable object)
throws IOException
{
object.toASN1Primitive().encode(new DEROutputStream(_bOut));
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Add an object to the SEQUENCE being generated.
*
* @param object an ASN.1 encodable object to add.
* @throws IOException if the target stream cannot be written to or the object cannot be encoded.
*/
public void addObject(
ASN1Encodable object)
throws IOException
{
object.toASN1Primitive().encode(new BEROutputStream(_out));
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void addObject(
ASN1Encodable object)
throws IOException
{
object.toASN1Primitive().encode(new DEROutputStream(_bOut));
}
代码示例来源:origin: redfish64/TinyTravelTracker
public void addObject(
ASN1Encodable object)
throws IOException
{
object.toASN1Primitive().encode(new BEROutputStream(_out));
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
void encode(
ASN1OutputStream out)
throws IOException
{
if (encoded != null)
{
out.writeEncoded(BERTags.SEQUENCE | BERTags.CONSTRUCTED, encoded);
}
else
{
super.toDLObject().encode(out);
}
}
}
代码示例来源:origin: redfish64/TinyTravelTracker
void encode(
ASN1OutputStream out)
throws IOException
{
if (encoded != null)
{
out.writeEncoded(BERTags.SEQUENCE | BERTags.CONSTRUCTED, encoded);
}
else
{
super.toDLObject().encode(out);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!