Package org.bouncycastle.bcpg
Class ArmoredInputStream.Builder
- java.lang.Object
-
- org.bouncycastle.bcpg.ArmoredInputStream.Builder
-
- Enclosing class:
- ArmoredInputStream
public static class ArmoredInputStream.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArmoredInputStream
build(java.io.InputStream inputStream)
ArmoredInputStream.Builder
setDetectMissingCRC(boolean detectMissingCRC)
Change how the stream should react if it encounters missing CRC checksum.ArmoredInputStream.Builder
setIgnoreCRC(boolean ignoreCRC)
Specifically ignore the CRC if in place (this will also avoid the cost of calculation).ArmoredInputStream.Builder
setParseForHeaders(boolean hasHeaders)
Enable or disable header parsing (default value true).
-
-
-
Method Detail
-
setParseForHeaders
public ArmoredInputStream.Builder setParseForHeaders(boolean hasHeaders)
Enable or disable header parsing (default value true).- Parameters:
hasHeaders
- true if headers should be expected, false otherwise.- Returns:
- the current builder instance.
-
setDetectMissingCRC
public ArmoredInputStream.Builder setDetectMissingCRC(boolean detectMissingCRC)
Change how the stream should react if it encounters missing CRC checksum. The default value is false (ignore missing CRC checksums). If the behavior is set to true, anIOException
will be thrown if a missing CRC checksum is encountered.- Parameters:
detectMissingCRC
- false if ignore missing CRC sums, true for exception
-
setIgnoreCRC
public ArmoredInputStream.Builder setIgnoreCRC(boolean ignoreCRC)
Specifically ignore the CRC if in place (this will also avoid the cost of calculation).- Parameters:
ignoreCRC
- true if CRC should be ignored, false otherwise.- Returns:
- the current builder instance.
-
build
public ArmoredInputStream build(java.io.InputStream inputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
-