Mark Base64 API with ExperimentalEncodingApi
This commit is contained in:
committed by
Space Team
parent
954ec1f63c
commit
ba2833b90f
@@ -35,7 +35,7 @@ import kotlin.io.encoding.Base64.Default.symbolsPerGroup
|
||||
* Closing the returned input stream will close the underlying input stream.
|
||||
*/
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
public fun InputStream.decodingWith(base64: Base64): InputStream {
|
||||
return DecodeInputStream(this, base64)
|
||||
}
|
||||
@@ -54,13 +54,13 @@ public fun InputStream.decodingWith(base64: Base64): InputStream {
|
||||
* Closing the returned output stream will close the underlying output stream.
|
||||
*/
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
public fun OutputStream.encodingWith(base64: Base64): OutputStream {
|
||||
return EncodeOutputStream(this, base64)
|
||||
}
|
||||
|
||||
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
private class DecodeInputStream(
|
||||
private val input: InputStream,
|
||||
private val base64: Base64
|
||||
@@ -228,7 +228,7 @@ private class DecodeInputStream(
|
||||
}
|
||||
}
|
||||
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
private class EncodeOutputStream(
|
||||
private val output: OutputStream,
|
||||
private val base64: Base64
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package kotlin.io.encoding
|
||||
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, startIndex: Int, endIndex: Int): ByteArray {
|
||||
return if (source is String) {
|
||||
@@ -20,7 +20,7 @@ internal actual inline fun Base64.platformCharsToBytes(source: CharSequence, sta
|
||||
|
||||
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun Base64.platformEncodeToString(source: ByteArray, startIndex: Int, endIndex: Int): String {
|
||||
// val subArray = if (startIndex == 0 && endIndex == source.size) {
|
||||
@@ -35,7 +35,7 @@ internal actual inline fun Base64.platformEncodeToString(source: ByteArray, star
|
||||
}
|
||||
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun Base64.platformEncodeIntoByteArray(
|
||||
source: ByteArray,
|
||||
@@ -55,7 +55,7 @@ internal actual inline fun Base64.platformEncodeIntoByteArray(
|
||||
}
|
||||
|
||||
@SinceKotlin("1.8")
|
||||
@ExperimentalStdlibApi
|
||||
@ExperimentalEncodingApi
|
||||
@kotlin.internal.InlineOnly
|
||||
internal actual inline fun Base64.platformEncodeToByteArray(
|
||||
source: ByteArray,
|
||||
@@ -73,7 +73,7 @@ internal actual inline fun Base64.platformEncodeToByteArray(
|
||||
}
|
||||
|
||||
//@SinceKotlin("1.8")
|
||||
//@ExperimentalStdlibApi
|
||||
//@ExperimentalEncodingApi
|
||||
//private fun Base64.javaEncoder(): java.util.Base64.Encoder {
|
||||
// return if (isMimeScheme) {
|
||||
// java.util.Base64.getMimeEncoder(Base64.mimeLineLength, Base64.mimeLineSeparatorSymbols)
|
||||
|
||||
Reference in New Issue
Block a user