Class Base58InputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
The default behavior of Base58InputStream is to decode, and the default behavior of Base58OutputStream is to encode. The builder can select either
behavior with setEncode(boolean).
Results are available only after EOF. Decoding accepts at most
Base58.DEFAULT_MAX_DECODE_LENGTH encoded bytes by default and throws IOException when an input chunk would exceed the cumulative
limit. To configure the limit, pass a codec built with Base58.Builder.setMaxDecodeLength(int) to the stream builder's
setBaseNCodec(Base58) method.
Encoding accepts at most Base58.DEFAULT_MAX_ENCODE_LENGTH binary bytes by default and throws IOException when an input chunk would
exceed that cumulative limit. Configure it with Base58.Builder.setMaxEncodeLength(int) on the codec passed to setBaseNCodec(Base58).
The complete input is retained until EOF. Memory usage is proportional to the accumulated input and conversion output. Configure both input limits appropriately for larger trusted values; encoded output can exceed the decode limit.
- Since:
- 1.22.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds instances of Base58InputStream.Nested classes/interfaces inherited from class BaseNCodecInputStream
BaseNCodecInputStream.AbstracBuilder<T,C, B> -
Field Summary
Fields inherited from class FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionBase58InputStream(InputStream inputStream) Constructs a Base58InputStream such that all data read is Base58-decoded from the original provided InputStream. -
Method Summary
Modifier and TypeMethodDescriptionstatic Base58InputStream.Builderbuilder()Constructs a new Builder.Methods inherited from class BaseNCodecInputStream
available, isStrictDecoding, mark, markSupported, read, read, reset, skipMethods inherited from class FilterInputStream
close, read
-
Constructor Details
-
Base58InputStream
Constructs a Base58InputStream such that all data read is Base58-decoded from the original provided InputStream.- Parameters:
inputStream- InputStream to wrap.
-
-
Method Details
-
builder
-