/** * Copies property values from another <code>EncodingInfo</code> instance. Strange enough, but * sometimes such behavior is preferred to simple assignment or cloning. More specifically, this * method is currently used (at least it was :) in <code> * XmlCharsetDetector.getCharsetAwareReader</code> (other two ways simply don't work). * * @param encInfo source object which properties should be mirrored in this instance */ public void copyFrom(EncodingInfo encInfo) { fEncoding = encInfo.getEncoding(); fIsBigEndian = encInfo.isBigEndian(); fHasBOM = encInfo.hasBOM(); }
encInfo = XmlCharsetDetector.getEncodingName(b4, count); response.setCharacterEncoding( encInfo.getEncoding() != null ? encInfo.getEncoding() : "UTF-8");
String charset = encInfo.getEncoding(); Boolean isBigEndian = encInfo.isBigEndian();
String ENCODING = encInfo.getEncoding().toUpperCase(Locale.ENGLISH); Boolean isBigEndian = encInfo.isBigEndian(); boolean hasBOM = encInfo.hasBOM();