public class

Surrogate

extends Object
java.lang.Object
   ↳ sun.nio.cs.Surrogate

Class Overview

Utility class for dealing with surrogates.

Summary

Nested Classes
class Surrogate.Generator Surrogate generation support. 
class Surrogate.Parser Surrogate parsing support. 
Constants
char MAX
char MAX_HIGH
char MAX_LOW
char MIN
char MIN_HIGH
char MIN_LOW
int UCS4_MAX
int UCS4_MIN
Public Methods
static char high(int uc)
Returns the high UTF-16 surrogate for the given UCS-4 character.
static boolean is(int c)
Tells whether or not the given UTF-16 value is a surrogate character,
static boolean isHigh(int c)
Tells whether or not the given UTF-16 value is a high surrogate.
static boolean isLow(int c)
Tells whether or not the given UTF-16 value is a low surrogate.
static char low(int uc)
Returns the low UTF-16 surrogate for the given UCS-4 character.
static boolean neededFor(int uc)
Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16.
static int toUCS4(char c, char d)
Converts the given surrogate pair into a 32-bit UCS-4 character.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final char MAX

Constant Value: 57343 (0x0000dfff)

public static final char MAX_HIGH

Constant Value: 56319 (0x0000dbff)

public static final char MAX_LOW

Constant Value: 57343 (0x0000dfff)

public static final char MIN

Constant Value: 55296 (0x0000d800)

public static final char MIN_HIGH

Constant Value: 55296 (0x0000d800)

public static final char MIN_LOW

Constant Value: 56320 (0x0000dc00)

public static final int UCS4_MAX

Constant Value: 1114111 (0x0010ffff)

public static final int UCS4_MIN

Constant Value: 65536 (0x00010000)

Public Methods

public static char high (int uc)

Returns the high UTF-16 surrogate for the given UCS-4 character.

public static boolean is (int c)

Tells whether or not the given UTF-16 value is a surrogate character,

public static boolean isHigh (int c)

Tells whether or not the given UTF-16 value is a high surrogate.

public static boolean isLow (int c)

Tells whether or not the given UTF-16 value is a low surrogate.

public static char low (int uc)

Returns the low UTF-16 surrogate for the given UCS-4 character.

public static boolean neededFor (int uc)

Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16.

public static int toUCS4 (char c, char d)

Converts the given surrogate pair into a 32-bit UCS-4 character.