Package org.bouncycastle.gpg
Class SExpression
- java.lang.Object
-
- org.bouncycastle.gpg.SExpression
-
public class SExpression extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSExpression.Builderstatic classSExpression.QuotedString
-
Constructor Summary
Constructors Constructor Description SExpression()SExpression(java.util.List<java.lang.Object> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(java.lang.Object value)static SExpression.Builderbuilder()SExpressionfilterIn(java.lang.String... keys)SExpressionfilterOut(java.lang.String... keys)byte[]getBytes(int i)SExpressiongetExpression(int i)SExpressiongetExpressionWithLabel(java.lang.String label)SExpressiongetExpressionWithLabelOrFail(java.lang.String label)intgetInt(int i)java.lang.StringgetString(int i)java.lang.ObjectgetValue(int i)java.util.List<java.lang.Object>getValues()booleanhasLabel(java.lang.String label)booleanisCanonical()static SExpressionparse(byte[] src, int maxDepth)static SExpressionparse(java.io.InputStream _src, int maxDepth)Parser for canonical and normal S-ExpressionsPGPExtendedKeyAttributetoAttribute()byte[]toCanonicalForm()voidtoCanonicalForm(java.io.OutputStream out)
-
-
-
Method Detail
-
parse
public static SExpression parse(byte[] src, int maxDepth) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public static SExpression parse(java.io.InputStream _src, int maxDepth) throws java.io.IOException
Parser for canonical and normal S-Expressions- Parameters:
_src- InputmaxDepth- maximum recursion depth before failing- Returns:
- An SExpression
- Throws:
java.io.IOException
-
builder
public static SExpression.Builder builder()
-
addValue
public void addValue(java.lang.Object value)
-
getValue
public java.lang.Object getValue(int i)
-
getString
public java.lang.String getString(int i)
-
getInt
public int getInt(int i)
-
getBytes
public byte[] getBytes(int i)
-
getExpression
public SExpression getExpression(int i)
-
getValues
public java.util.List<java.lang.Object> getValues()
-
isCanonical
public boolean isCanonical()
-
toAttribute
public PGPExtendedKeyAttribute toAttribute()
-
filterOut
public SExpression filterOut(java.lang.String... keys)
-
filterIn
public SExpression filterIn(java.lang.String... keys)
-
toCanonicalForm
public byte[] toCanonicalForm()
-
toCanonicalForm
public void toCanonicalForm(java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
hasLabel
public boolean hasLabel(java.lang.String label)
-
getExpressionWithLabel
public SExpression getExpressionWithLabel(java.lang.String label)
-
getExpressionWithLabelOrFail
public SExpression getExpressionWithLabelOrFail(java.lang.String label)
-
-