code: public static ByteBuffer s2bb(String string) {
          if (string == null) {
              return null;
          }
          byte[] stringBytes = string.getBytes(UTF8);
          ByteBuffer allBytes = ByteBuffer.allocateDirect(stringBytes.length);
          allBytes.position(0);
          allBytes.put(stringBytes);
          return allBytes;
      }
docs: Java-to-native string mapping (using direct ByteBuffer)
  @param string
  @return native string