Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.io
Class UTF8Encoder

    java.lang.Object
      com.novell.io.CharEncoder
          com.novell.io.UTF8Encoder

    public class UTF8Encoder

extends CharEncoder

This class implements UTF-8 character encoding for use by the EncodingStreamWriter class

Field Summary
`static String` | `NAME` Name of encoding that this encoder implements.

Constructor Summary
`UTF8Encoder()`

Method Summary
`int` | `encodeChar(int c, byte[] buffer, int off)` Implementation of UTF-8 character encoding
`String` | `getEncoding()` Return the string identifier for this encoding scheme.

Methods inherited from class com.novell.io.CharEncoder
`doGetClass, encodeChars, getEncoder, registerEncoder, reset`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NAME

    public static final String NAME

  Name of encoding that this encoder implements.

  See Also:
    Constant Field Values

Constructor Detail

### UTF8Encoder

    public UTF8Encoder()

Method Detail

### encodeChar

    public int encodeChar(int c,
                          byte[] buffer,
                          int off)
                   throws CharEncodingException,
                          EncodingBufferFullException

  Implementation of UTF-8 character encoding

  Specified by:
    `encodeChar` in class `CharEncoder`
  Parameters:
    `c` - The 32-bit character value to encode
    `buffer` - The byte buffer in which to placed encoded bytes
    `off` - The offset at which to place bytes into the buffer
  Returns:
    The number of bytes placed in the buffer
  Throws:
    `CharEncodingException` - The character could not be encoded in the implemented encoding scheme.
    `EncodingBufferFullException` - There is not enough room in buffer for all the bytes needed to encode the character.

### getEncoding

    public String getEncoding()

  Return the string identifier for this encoding scheme.

  Specified by:
    `getEncoding` in class `CharEncoder`
  Returns:
    The string identifier for this encoding scheme.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD