congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Encodings
Code IndexAdd Tabnine to your IDE (free)

How to use
Encodings
in
org.apache.xml.serializer

Best Java code snippets using org.apache.xml.serializer.Encodings (Showing top 20 results out of 315)

origin: robovm/robovm

        || encoding.equalsIgnoreCase("UTF8"))
        ? DEFAULT_MIME_ENCODING
        : convertJava2MimeEncoding(encoding);
encoding = convertJava2MimeEncoding(encoding);
origin: robovm/robovm

String newEncoding = val;
if (OutputKeys.ENCODING.equals(name)) {
  String possible_encoding = Encodings.getMimeEncoding(val);
  if (possible_encoding != null) {
    EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding);
    if (newEncoding != null && encodingInfo.name == null) {
      encodingInfo = Encodings.getEncodingInfo(newEncoding);
origin: robovm/robovm

try
  osw = Encodings.getWriter(output, encoding);
setEncoding(encoding);
try {
  osw = Encodings.getWriter(output, encoding);
} catch (UnsupportedEncodingException e) {
origin: robovm/robovm

if (!Encodings.isLowUTF16Surrogate(low)) {
  throw new IOException(
    Utils.messages.createMessage(
    codePoint = Encodings.toCodePoint(high, low);
origin: robovm/robovm

if (Encodings.isHighUTF16Surrogate(ch))
    if (!(Encodings.isLowUTF16Surrogate(next)))
      throw new IOException(
        Utils.messages.createMessage(
    codePoint = Encodings.toCodePoint(ch,next);
origin: robovm/robovm

/**
 * Try the best we can to convert a Java encoding to a XML-style encoding.
 * <p>
 * This is not a public API.
 * @param encoding non-null reference to encoding string, java style.
 *
 * @return ISO-style encoding string.
 * @xsl.usage internal
 */
private static String convertJava2MimeEncoding(String encoding)
{
  EncodingInfo enc =
    (EncodingInfo) _encodingTableKeyJava.get(toUpperCaseFast(encoding));
  if (null != enc)
    return enc.name;
  return encoding;
}
origin: robovm/robovm

if (getOmitXMLDeclaration() == false)
  String encoding = Encodings.getMimeEncoding(getEncoding());
  String standalone;
origin: robovm/robovm

int len = lengthOfMimeNames(val);
origin: robovm/robovm

if (!Encodings.isRecognizedEncoding(fEncoding)) {
  String msg = Utils.messages
  .createMessage(
origin: robovm/robovm

public boolean isInEncoding(char ch1) {
  final boolean ret;
  int codePoint = Encodings.toCodePoint(ch1);
  if (codePoint < m_explFirst) {
origin: robovm/robovm

  writer.write(c);
} else if (Encodings.isHighUTF16Surrogate(c)) {
  final int codePoint = writeUTF16Surrogate(c, ch, i, end);
  if (codePoint != 0) {
origin: ibinti/bugvm

if (!Encodings.isLowUTF16Surrogate(low)) {
  throw new IOException(
    Utils.messages.createMessage(
    codePoint = Encodings.toCodePoint(high, low);
origin: MobiVM/robovm

if (Encodings.isHighUTF16Surrogate(ch))
    if (!(Encodings.isLowUTF16Surrogate(next)))
      throw new IOException(
        Utils.messages.createMessage(
    codePoint = Encodings.toCodePoint(ch,next);
origin: robovm/robovm

/**
 * Returns the EncodingInfo object for the specified
 * encoding, never null, although the encoding name 
 * inside the returned EncodingInfo object will be if
 * we can't find a "real" EncodingInfo for the encoding.
 * <p>
 * This is not a public API.
 *
 * @param encoding The encoding
 * @return The object that is used to determine if 
 * characters are in the given encoding.
 * @xsl.usage internal
 */
static EncodingInfo getEncodingInfo(String encoding)
{
  EncodingInfo ei;
  String normalizedEncoding = toUpperCaseFast(encoding);
  ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding);
  if (ei == null)
    ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding);
  if (ei == null) {
    // We shouldn't have to do this, but just in case.
    ei = new EncodingInfo(null,null, '\u0000');
  }
  return ei;
}
origin: robovm/robovm

== m_text_properties.getProperty(OutputKeys.ENCODING))
String mimeEncoding = Encodings.getMimeEncoding(null);
m_text_properties.put(
  OutputKeys.ENCODING,
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

int len = lengthOfMimeNames(val);
origin: org.apache.xalan/com.springsource.org.apache.xml.serializer

if (!Encodings.isRecognizedEncoding(fEncoding)) {
  String msg = Utils.messages
  .createMessage(
origin: robovm/robovm

public boolean isInEncoding(char high, char low) {
  final boolean ret;
  int codePoint = Encodings.toCodePoint(high,low);
  if (codePoint < m_explFirst) {
origin: robovm/robovm

if (Encodings.isHighUTF16Surrogate(c))
else if (Encodings.isHighUTF16Surrogate(c))
origin: MobiVM/robovm

String newEncoding = val;
if (OutputKeys.ENCODING.equals(name)) {
  String possible_encoding = Encodings.getMimeEncoding(val);
  if (possible_encoding != null) {
    EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding);
    if (newEncoding != null && encodingInfo.name == null) {
      encodingInfo = Encodings.getEncodingInfo(newEncoding);
org.apache.xml.serializerEncodings

Javadoc

Provides information about encodings. Depends on the Java runtime to provides writers for the different encodings.

This class is not a public API. It is only public because it is used outside of this package.

Most used methods

  • convertJava2MimeEncoding
    Try the best we can to convert a Java encoding to a XML-style encoding. This is not a public API.
  • getEncodingInfo
    Returns the EncodingInfo object for the specified encoding, never null, although the encoding name i
  • getMimeEncoding
    Get the proper mime encoding. From the XSLT recommendation: "The encoding attribute specifies the pr
  • getWriter
    Returns a writer for the specified encoding based on an output stream. This is not a public API.
  • isHighUTF16Surrogate
    Return true if the character is the high member of a surrogate pair. This is not a public API.
  • isLowUTF16Surrogate
    Return true if the character is the low member of a surrogate pair. This is not a public API.
  • lengthOfMimeNames
    Get the length of the Mime names within the property value
  • toCodePoint
    Return the unicode code point represented by the high/low surrogate pair. This is not a public API.
  • toUpperCaseFast
    A fast and cheap way to uppercase a String that is only made of printable ASCII characters. This is
  • isRecognizedEncoding
    Determines if the encoding specified was recognized by the serializer or not.
  • convertMime2JavaEncoding
    Try the best we can to convert a Java encoding to a XML-style encoding. This is not a public API.
  • convertMime2JavaEncoding

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFileChooser (javax.swing)
  • JTextField (javax.swing)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now