Skip to content

Commit 3c84e5f

Browse files
committed
Port Base32OutputStream to non-deprecated methods
1 parent 0decfd7 commit 3c84e5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Base32OutputStream(final OutputStream outputStream) {
8080
* true if we should encode all data written to us, false if we should decode.
8181
*/
8282
public Base32OutputStream(final OutputStream outputStream, final boolean doEncode) {
83-
super(outputStream, new Base32(false), doEncode);
83+
super(outputStream, Base32.builder().get(), doEncode);
8484
}
8585

8686
/**
@@ -100,7 +100,7 @@ public Base32OutputStream(final OutputStream outputStream, final boolean doEncod
100100
* If lineLength <= 0, the lineSeparator is not used. If doEncode is false lineSeparator is ignored.
101101
*/
102102
public Base32OutputStream(final OutputStream outputStream, final boolean doEncode, final int lineLength, final byte[] lineSeparator) {
103-
super(outputStream, new Base32(lineLength, lineSeparator), doEncode);
103+
super(outputStream, Base32.builder().setLineLength(lineLength).setLineSeparator(lineSeparator).get(), doEncode);
104104
}
105105

106106
/**
@@ -123,7 +123,7 @@ public Base32OutputStream(final OutputStream outputStream, final boolean doEncod
123123
*/
124124
public Base32OutputStream(final OutputStream outputStream, final boolean doEncode, final int lineLength, final byte[] lineSeparator,
125125
final CodecPolicy decodingPolicy) {
126-
super(outputStream, new Base32(lineLength, lineSeparator, false, BaseNCodec.PAD_DEFAULT, decodingPolicy), doEncode);
126+
super(outputStream, Base32.builder().setLineLength(lineLength).setLineSeparator(lineSeparator).setDecodingPolicy(decodingPolicy).get(), doEncode);
127127
}
128128

129129
}

0 commit comments

Comments
 (0)