Skip to content

Commit f2b9b71

Browse files
committed
Port Base64InputStream to non-deprecated methods
1 parent 7f1a796 commit f2b9b71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Base64InputStream(final InputStream inputStream) {
8080
* true if we should encode all data read from us, false if we should decode.
8181
*/
8282
public Base64InputStream(final InputStream inputStream, final boolean doEncode) {
83-
super(inputStream, new Base64(false), doEncode);
83+
super(inputStream, Base64.builder().get(), doEncode);
8484
}
8585

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

106106
/**
@@ -122,7 +122,7 @@ public Base64InputStream(final InputStream inputStream, final boolean doEncode,
122122
* @since 1.15
123123
*/
124124
public Base64InputStream(final InputStream inputStream, final boolean doEncode, final int lineLength, final byte[] lineSeparator,
125-
final CodecPolicy decodingPolicy) {
126-
super(inputStream, new Base64(lineLength, lineSeparator, false, decodingPolicy), doEncode);
125+
final CodecPolicy decodingPolicy) {
126+
super(inputStream, Base64.builder().setLineLength(lineLength).setLineSeparator(lineSeparator).setDecodingPolicy(decodingPolicy).get(), doEncode);
127127
}
128128
}

0 commit comments

Comments
 (0)