MPD: Java::String Class Reference

MPD 0.20.15

Public Member Functions | Static Public Member Functions
Java::String Class Reference

Wrapper for a local "jstring" reference. More...

`#include <String.hxx>`

Inheritance diagram for Java::String:
[legend]
Collaboration diagram for Java::String:
[legend]

## Public Member Functions
| String (JNIEnv *env, jstring value)
| String (JNIEnv *_env, const char *_value)
char * | CopyTo (JNIEnv *env, char *buffer, size_t max_size)
| Copy the value to the specified buffer. More...
Public Member Functions inherited from Java::LocalRef< jstring >
| LocalRef (JNIEnv *_env, jstring _value)
| The local reference is obtained by the caller. More...
| LocalRef (const LocalRef &other)=delete
| ~LocalRef ()
LocalRef & | operator= (const LocalRef &other)=delete
jstring | Get () const
| operator jstring () const

## Static Public Member Functions
static char * | CopyTo (JNIEnv *env, jstring value, char *buffer, size_t max_size)
| Copy the value to the specified buffer. More...

## Detailed Description

Wrapper for a local "jstring" reference.

Definition at line 44 of file String.hxx.

## Constructor & Destructor Documentation

## ◆ String() [1/2]

Java::String::String | ( | JNIEnv * | env,
|  | jstring | value
| ) |  |
| inline

Definition at line 46 of file String.hxx.

## ◆ String() [2/2]

Java::String::String | ( | JNIEnv * | _env,
|  | const char * | _value
| ) |  |
| inline

Definition at line 49 of file String.hxx.

## Member Function Documentation

## ◆ CopyTo() [1/2]

static char* Java::String::CopyTo | ( | JNIEnv * | env,
|  | jstring | value,
|  | char * | buffer,
|  | size_t | max_size
| ) |  |
| static

Copy the value to the specified buffer.

Truncates the value if it does not fit into the buffer.

Returns
  a pointer to the terminating null byte, nullptr on error

## ◆ CopyTo() [2/2]

char* Java::String::CopyTo | ( | JNIEnv * | env,
|  | char * | buffer,
|  | size_t | max_size
| ) |  |
| inline

Copy the value to the specified buffer.

Truncates the value if it does not fit into the buffer.

Returns
  a pointer to the terminating null byte, nullptr on error

Definition at line 69 of file String.hxx.

The documentation for this class was generated from the following file:

- java/String.hxx