Top Description Inners Fields Constructors Methods
org.apache.xml.serialize

public Class EncodingInfo

extends Object
Class Inheritance
Imports
java.io.OutputStream, .OutputStreamWriter, .UnsupportedEncodingException, .Writer, org.apache.xerces.util.EncodingMap

Deprecated

This class was deprecated in Xerces 2.9.0. It is recommended that new applications use the DOM Level 3 LSSerializer or JAXP's Transformation API for XML (TrAX) for serializing XML. See the Xerces documentation for more information.

This class represents an encoding.
Version
$Id: EncodingInfo.java 699892 2008-09-28 21:08:27Z mrglavas $

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
EncodingInfo.CharsetMethods

Holder of methods from java.nio.charset.Charset and java.nio.charset.CharsetEncoder.

pack-priv static class
EncodingInfo.CharToByteConverterMethods

Holder of methods from sun.io.CharToByteConverter.

Field Summary

Modifier and TypeField and Description
private Object[]
pack-priv Object
pack-priv Object
pack-priv boolean
pack-priv boolean
pack-priv String
pack-priv String
pack-priv int

Constructor Summary

AccessConstructor and Description
public
EncodingInfo(String ianaName, String javaName, int lastPrintable)

Creates new EncodingInfo instance.

Method Summary

Modifier and TypeMethod and Description
public String
getIANAName()

Returns a MIME charset name of this encoding.

public Writer

Returns:

A suitable writer
getWriter
(OutputStream output)

Returns a writer for this encoding based on an output stream.

public boolean
isPrintable(char
a code point (0-0x10ffff)
ch
)

Checks whether the specified character is printable or not in this encoding.

private boolean
isPrintable0(char
a code point (0-0x10ffff)
ch
)

Checks whether the specified character is printable or not in this encoding.

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fArgsForMethodback to summary
private Object[] fArgsForMethod
fCharsetEncoderback to summary
pack-priv Object fCharsetEncoder
fCharToByteConverterback to summary
pack-priv Object fCharToByteConverter
fHaveTriedCharsetEncoderback to summary
pack-priv boolean fHaveTriedCharsetEncoder
fHaveTriedCToBback to summary
pack-priv boolean fHaveTriedCToB
ianaNameback to summary
pack-priv String ianaName
javaNameback to summary
pack-priv String javaName
lastPrintableback to summary
pack-priv int lastPrintable

Constructor Detail

EncodingInfoback to summary
public EncodingInfo(String ianaName, String javaName, int lastPrintable)

Creates new EncodingInfo instance.

Method Detail

getIANANameback to summary
public String getIANAName()

Returns a MIME charset name of this encoding.

getWriterback to summary
public Writer getWriter(OutputStream output) throws UnsupportedEncodingException

Returns a writer for this encoding based on an output stream.

Returns:Writer

A suitable writer

Exceptions
UnsupportedEncodingException:
There is no convertor to support this encoding
isPrintableback to summary
public boolean isPrintable(char ch)

Checks whether the specified character is printable or not in this encoding.

Parameters
ch:char

a code point (0-0x10ffff)

isPrintable0back to summary
private boolean isPrintable0(char ch)

Checks whether the specified character is printable or not in this encoding. This method accomplishes this using a java.nio.CharsetEncoder. If NIO isn't available it will attempt use a sun.io.CharToByteConverter.

Parameters
ch:char

a code point (0-0x10ffff)

testJavaEncodingNameback to summary
public static void testJavaEncodingName(String name) throws UnsupportedEncodingException
org.apache.xml.serialize back to summary

pack-priv Class EncodingInfo.CharsetMethods

extends Object
Class Inheritance

Holder of methods from java.nio.charset.Charset and java.nio.charset.CharsetEncoder.

Field Summary

Modifier and TypeField and Description
private static Method
private static Method
private static Method
private static Method
private static boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fgCharsetCanEncodeMethodback to summary
private static Method fgCharsetCanEncodeMethod
fgCharsetEncoderCanEncodeMethodback to summary
private static Method fgCharsetEncoderCanEncodeMethod
fgCharsetForNameMethodback to summary
private static Method fgCharsetForNameMethod
fgCharsetNewEncoderMethodback to summary
private static Method fgCharsetNewEncoderMethod
fgNIOCharsetAvailableback to summary
private static boolean fgNIOCharsetAvailable

Constructor Detail

CharsetMethodsback to summary
private CharsetMethods()
org.apache.xml.serialize back to summary

pack-priv Class EncodingInfo.CharToByteConverterMethods

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.xml.serialize.EncodingInfo.CharToByteConverterMethods

Holder of methods from sun.io.CharToByteConverter.

Field Summary

Modifier and TypeField and Description
private static Method
private static boolean
private static Method

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fgCanConvertMethodback to summary
private static Method fgCanConvertMethod
fgConvertersAvailableback to summary
private static boolean fgConvertersAvailable
fgGetConverterMethodback to summary
private static Method fgGetConverterMethod

Constructor Detail

CharToByteConverterMethodsback to summary
private CharToByteConverterMethods()