Package org.apache.groovy.jsondirect

## Class DirectFastStringService

- java.lang.Object
- - org.apache.groovy.jsondirect.DirectFastStringService

- All Implemented Interfaces:
    `FastStringService`

      public class DirectFastStringService
      extends Object
      implements FastStringService

  Internal class for fast processing of Strings during JSON parsing - direct field writing version. Works for JDK 7 and 8 for most JDK implementations but uses the Unsafe mechanism of Java.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DirectFastStringService()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `noCopyStringFromChars​(char[] chars)` |
    `char[]` | `toCharArray​(String string)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectFastStringService

          public DirectFastStringService()

  - ### Method Detail

    - #### toCharArray

          public char[] toCharArray​(String string)

      Specified by:
        `toCharArray` in interface `FastStringService`
      Parameters:
        `string` - string to grab array from.
      Returns:
        char array from string

    - #### noCopyStringFromChars

          public String noCopyStringFromChars​(char[] chars)

      Specified by:
        `noCopyStringFromChars` in interface `FastStringService`
      Parameters:
        `chars` - to shove array into.
      Returns:
        new string with chars copied into it