code: public static byte[] s2n(String string) {
          if (string == null) {
              return null;
          }
          byte[] stringBytes = string.getBytes(UTF8);
          byte[] allBytes = new byte[stringBytes.length + 1];
          System.arraycopy(stringBytes, 0, allBytes, 0, stringBytes.length);
          return allBytes;
      }
docs: Java-to-native string mapping
  @param string
  @return native string