Skip to content

Commit 0decfd7

Browse files
committed
Port Base32InputStream to non-deprecated methods
1 parent f2b9b71 commit 0decfd7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/org/apache/commons/codec/binary/Base32InputStream.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public Base32InputStream(final InputStream inputStream) {
7676
* true if we should encode all data read from us, false if we should decode.
7777
*/
7878
public Base32InputStream(final InputStream inputStream, final boolean doEncode) {
79-
super(inputStream, new Base32(false), doEncode);
79+
super(inputStream, Base32.builder().get(), doEncode);
8080
}
8181

8282
/**
@@ -96,7 +96,7 @@ public Base32InputStream(final InputStream inputStream, final boolean doEncode)
9696
* If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.
9797
*/
9898
public Base32InputStream(final InputStream inputStream, final boolean doEncode, final int lineLength, final byte[] lineSeparator) {
99-
super(inputStream, new Base32(lineLength, lineSeparator), doEncode);
99+
super(inputStream, Base32.builder().setLineLength(lineLength).setLineSeparator(lineSeparator).get(), doEncode);
100100
}
101101

102102
/**
@@ -119,8 +119,7 @@ public Base32InputStream(final InputStream inputStream, final boolean doEncode,
119119
* @since 1.15
120120
*/
121121
public Base32InputStream(final InputStream inputStream, final boolean doEncode, final int lineLength, final byte[] lineSeparator,
122-
final CodecPolicy decodingPolicy) {
123-
super(inputStream, new Base32(lineLength, lineSeparator, false, BaseNCodec.PAD_DEFAULT, decodingPolicy), doEncode);
122+
final CodecPolicy decodingPolicy) {
123+
super(inputStream, Base32.builder().setLineLength(lineLength).setLineSeparator(lineSeparator).setDecodingPolicy(decodingPolicy).get(), doEncode);
124124
}
125-
126125
}

0 commit comments

Comments
 (0)