mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
convert StandardCharsets to Kotlin (#43790)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43790 convert Java to Kotlin: `react/common/StandardCharsets.java` Changelog: [Internal] internal Reviewed By: cortinico Differential Revision: D55611308 fbshipit-source-id: 11af39f9bcff555c7d5b30e1836d73c09d278f72
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9c00d6d332
commit
c84f5cb5cd
@@ -1760,6 +1760,7 @@ public final class com/facebook/react/common/SingleThreadAsserter {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/common/StandardCharsets {
|
||||
public static final field INSTANCE Lcom/facebook/react/common/StandardCharsets;
|
||||
public static final field UTF_16 Ljava/nio/charset/Charset;
|
||||
public static final field UTF_16BE Ljava/nio/charset/Charset;
|
||||
public static final field UTF_16LE Ljava/nio/charset/Charset;
|
||||
|
||||
+12
-17
@@ -5,32 +5,27 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.common;
|
||||
package com.facebook.react.common
|
||||
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.Charset
|
||||
import kotlin.jvm.JvmField
|
||||
|
||||
/**
|
||||
* Not all versions of Android SDK have this class in nio package. This is the reason to have it
|
||||
* around.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@Deprecated(
|
||||
since = "Deprecated class since v0.73.0, please use java.nio.charset.StandardCharsets instead.",
|
||||
forRemoval = true)
|
||||
public final class StandardCharsets {
|
||||
|
||||
private StandardCharsets() {}
|
||||
|
||||
message =
|
||||
"Deprecated class since v0.73.0, please use java.nio.charset.StandardCharsets instead.",
|
||||
replaceWith = ReplaceWith("java.nio.charset.StandardCharsets"),
|
||||
level = DeprecationLevel.ERROR)
|
||||
public object StandardCharsets {
|
||||
/** Eight-bit UCS Transformation Format */
|
||||
public static final Charset UTF_8 = Charset.forName("UTF-8");
|
||||
|
||||
@JvmField public val UTF_8: Charset = Charset.forName("UTF-8")
|
||||
/** Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark */
|
||||
public static final Charset UTF_16 = Charset.forName("UTF-16");
|
||||
|
||||
@JvmField public val UTF_16: Charset = Charset.forName("UTF-16")
|
||||
/** Sixteen-bit UCS Transformation Format, big-endian byte order */
|
||||
public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
|
||||
|
||||
@JvmField public val UTF_16BE: Charset = Charset.forName("UTF-16BE")
|
||||
/** Sixteen-bit UCS Transformation Format, little-endian byte order */
|
||||
public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
|
||||
@JvmField public val UTF_16LE: Charset = Charset.forName("UTF-16LE")
|
||||
}
|
||||
Reference in New Issue
Block a user