public class StringCharArrayAccessor extends Object
| Constructor and Description | 
|---|
| StringCharArrayAccessor() | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | createString(char[] charBuf)creates a new java.lang.String by setting the char array directly to the String instance with reflection. | 
| static boolean | isEnabled() | 
| static void | writeStringAsCharArray(Writer writer,
                      String str)Writes a portion of a string to a target java.io.Writer with direct access to the char[] of the java.lang.String | 
| static void | writeStringAsCharArray(Writer writer,
                      String str,
                      int off,
                      int len)Writes a portion of a string to a target java.io.Writer with direct access to the char[] of the java.lang.String | 
public static void writeStringAsCharArray(Writer writer, String str) throws IOException
writer - target java.io.Writer for outputstr - A StringIOException - If an I/O error occurspublic static void writeStringAsCharArray(Writer writer, String str, int off, int len) throws IOException
writer - target java.io.Writer for outputstr - A Stringoff - Offset from which to start writing characterslen - Number of characters to writeIOException - If an I/O error occurspublic static String createString(char[] charBuf)
charBuf - char array to be used as java.lang.String content, don't modify it after passing it.public static boolean isEnabled()
Copyright © 2022 The Apache Software Foundation. All rights reserved.