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

## com.hp.hpl.jena.util
Class CharEncoding

    java.lang.Object
      com.hp.hpl.jena.util.CharEncoding

    public abstract class CharEncoding

extends java.lang.Object

This class provides a number of static methods which interact with java.nio.charset.Charset to analyze and transform the strings identifing character encodings.

Author:
  Jeremy J. Carroll

Method Summary
`static CharEncoding` | `create(java.lang.String enc)` Create a new CharacterEncoding object, given a name of a character encoding identifying it.
`abstract boolean` | `isIANA()` Returns true if this charset registered at IANA.
`abstract boolean` | `isInNIO()` Returns true if this charset is supported by java.nio.charset.Charset.
`java.lang.String` | `name()` Gives the canonical name for this charset.
`abstract java.lang.String` | `warningMessage()` If `isIANA()` or `isInNIO()` return false, this returns a suggested warning message.

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

Method Detail

### name

    public java.lang.String name()

  Gives the canonical name for this charset. If `isIANA()` returns true, then this is the name registered at IANA. If `isInNIO()` returns true, and `isIANA()` returns false, then this name will start with "x-". The name is case insensitive, but not case normalized.

  Returns:
    Canonical name.

### isIANA

    public abstract boolean isIANA()

  Returns true if this charset registered at IANA. Since the registry may change, the results of this method may not be entirely up-to-date, and draws from the knowledge in the Java java.nio.charset.Charset class. If `isInNIO()` returns false, no information is known, and this method returns false.

  Returns:
    true if this character encoding is IANA registered.

### isInNIO

    public abstract boolean isInNIO()

  Returns true if this charset is supported by java.nio.charset.Charset. Without this support `isIANA()` does not work correctly.

  Returns:
    true if this charset is supported by java.nio.charset.Charset.

### warningMessage

    public abstract java.lang.String warningMessage()

  If `isIANA()` or `isInNIO()` return false, this returns a suggested warning message. If `isIANA()` is true, then this returns null.

  Returns:
    A message (or null)

### create

    public static CharEncoding create(java.lang.String enc)

  Create a new CharacterEncoding object, given a name of a character encoding identifying it.

  Parameters:
    `enc` - A name.
  Returns:
    The corresponding CharacterEncoding object.

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

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP