< prev index next >

src/java.base/share/classes/java/lang/StringConcatHelper.java

Print this page

        

@@ -340,6 +340,14 @@
     static String newString(byte[] buf, byte coder) {
         // Use the private, non-copying constructor (unsafe!)
         return new String(buf, coder);
     }
 
+    /**
+     * Provides the initial coder for the String.
+     * @return initial coder
+     */
+    static byte initialCoder() {
+        return String.COMPACT_STRINGS ? String.LATIN1 : String.UTF16;
+    }
+
 }
< prev index next >