APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xml.internal.serialize

public Class EncodingInfo

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
java.io.OutputStream, .OutputStreamWriter, .UnsupportedEncodingException, .Writer, com.sun.org.apache.xerces.internal.util.EncodingMap, java.nio.charset.Charset, .CharsetEncoder

Deprecated

As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation is replaced by that of Xalan. Main class com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl is replaced by com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl.

This class represents an encoding.

Field Summary

Modifier and TypeField and Description
pack-priv CharsetEncoder
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

fCharsetEncoderback to summary
pack-priv CharsetEncoder fCharsetEncoder
fHaveTriedCharsetEncoderback to summary
pack-priv boolean fHaveTriedCharsetEncoder
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