/** * 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; }
/** * 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; }
/** * Characters with values at or below the high code point are * in the encoding. Code point values above this one may or may * not be in the encoding, but lower ones certainly are. * <p> * This is for performance. * * @param encoding The encoding * @return The code point for which characters at or below this code point * are in the encoding. Characters with higher code point may or may not be * in the encoding. A value of zero is returned if the high code point is unknown. * <p> * This method is not a public API. * @xsl.usage internal */ static public char getHighChar(String encoding) { final char highCodePoint; EncodingInfo ei; String normalizedEncoding = toUpperCaseFast(encoding); ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); if (ei == null) ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); if (ei != null) highCodePoint = ei.getHighChar(); else highCodePoint = 0; return highCodePoint; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Characters with values at or below the high code point are * in the encoding. Code point values above this one may or may * not be in the encoding, but lower ones certainly are. * <p> * This is for performance. * * @param encoding The encoding * @return The code point for which characters at or below this code point * are in the encoding. Characters with higher code point may or may not be * in the encoding. A value of zero is returned if the high code point is unknown. * <p> * This method is not a public API. * @xsl.usage internal */ static public char getHighChar(String encoding) { final char highCodePoint; EncodingInfo ei; String normalizedEncoding = toUpperCaseFast(encoding); ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); if (ei == null) ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); if (ei != null) highCodePoint = ei.getHighChar(); else highCodePoint = 0; return highCodePoint; }
/** * 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; }
/** * 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; }
/** * 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; }