public void setSourceEncoding (final String sSourceEncoding) { // Throws an exception on an illegal charset CharsetHelper.getCharsetFromName (sSourceEncoding); sourceEncoding = sSourceEncoding; }
public void setTargetEncoding (final String sTargetEncoding) { // Throws an exception on an illegal charset CharsetHelper.getCharsetFromName (sTargetEncoding); targetEncoding = sTargetEncoding; }
public void setEncoding (@Nullable final String sEncoding) { m_aEncoding = sEncoding == null ? null : CharsetHelper.getCharsetFromName (sEncoding); }
private void readObject (@Nonnull final ObjectInputStream in) throws IOException, ClassNotFoundException { m_aMimeType = (IMimeType) in.readObject (); m_bBase64Encoded = in.readBoolean (); m_aContent = (byte []) in.readObject (); final String sCharsetName = in.readUTF (); m_aCharset = CharsetHelper.getCharsetFromName (sCharsetName); m_sContent = (String) in.readObject (); }
public void setCharacterEncoding (@Nullable final String sCharacterEncoding) { setCharacterEncoding (sCharacterEncoding == null ? null : CharsetHelper.getCharsetFromName (sCharacterEncoding)); }
public void writeStartDocument (@Nonnull final String sEncoding, @Nullable final String sVersion) throws XMLStreamException { writeStartDocument (CharsetHelper.getCharsetFromName (sEncoding), EXMLVersion.getFromVersionOrNull (sVersion)); }
/** * @return The charset defined for this request. May be <code>null</code> if * none is present; */ @Nullable default Charset getCharset () { final String sEncoding = getRequest ().getCharacterEncoding (); return StringHelper.hasNoText (sEncoding) ? null : CharsetHelper.getCharsetFromName (sEncoding); }
public final void setEncoding (@Nonnull @Nonempty final String sEncoding) { ValueEnforcer.notEmpty (sEncoding, "Encoding"); // Throws IllegalArgumentException in case it is unknown CharsetHelper.getCharsetFromName (sEncoding); m_sEncoding = sEncoding; }
final Charset aReadCharset = CharsetHelper.getCharsetFromName (sPlainCharsetName);
@Nonnull @ContainsSoftMigration public EmailAttachment convertToNative (@Nonnull final IMicroElement eAttachment) { final String sFilename = eAttachment.getAttributeValue (ATTR_FILENAME); final String sCharset = eAttachment.getAttributeValue (ATTR_CHARSET); final Charset aCharset = sCharset == null ? null : CharsetHelper.getCharsetFromName (sCharset); String sContentType = eAttachment.getAttributeValue (ATTR_CONTENT_TYPE); if (sContentType == null) { // Soft migration 8.6.3 sContentType = FileTypeMap.getDefaultFileTypeMap ().getContentType (sFilename); } final String sDisposition = eAttachment.getAttributeValue (ATTR_DISPOSITION); EEmailAttachmentDisposition eDisposition = EEmailAttachmentDisposition.getFromIDOrNull (sDisposition); if (eDisposition == null) { // migration eDisposition = EmailAttachment.DEFAULT_DISPOSITION; } final byte [] aContent = Base64.safeDecode (eAttachment.getTextContent ()); return new EmailAttachment (sFilename, aContent, aCharset, sContentType, eDisposition); } }
_getRelativePath (aChild), ex); final Charset aFallbackCharset = CharsetHelper.getCharsetFromName (sourceEncoding); final CSSReaderSettings aSettings = new CSSReaderSettings ().setCSSVersion (ECSSVersion.CSS30) .setFallbackCharset (aFallbackCharset) aWriterSettings.setWriteUnknownRules (writeUnknownRules); final Charset aTargetCharset = CharsetHelper.getCharsetFromName (targetEncoding); new CSSWriter (aWriterSettings).writeCSS (aCSS, aDestFile.getWriter (aTargetCharset, EAppend.TRUNCATE));
: CharsetHelper.getCharsetFromName (sCharset);
Charset aCharset = null; if (sCharset != null) aCharset = CharsetHelper.getCharsetFromName (sCharset);