Package com.helger.xml.serialize.read
Class XMLCharsetDeterminator
java.lang.Object
com.helger.xml.serialize.read.XMLCharsetDeterminator
XML charset determinator based on a byte array.
- Since:
- 9.0.0
- Author:
- Philip Helger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CharsetdetermineXMLCharset(byte[] aBytes) Determine the XML charsetstatic com.helger.commons.collection.impl.ICommonsSet<Charset>
-
Field Details
-
FALLBACK_CHARSET
-
-
Method Details
-
getAllSupportedCharsets
@Nonnull @ReturnsMutableCopy public static com.helger.commons.collection.impl.ICommonsSet<Charset> getAllSupportedCharsets()- Returns:
- A mutable Set with all charsets that can be used for the charset
determination. Never
null.
-
determineXMLCharset
Determine the XML charset- Parameters:
aBytes- XML byte representation- Returns:
nullif no charset was found. In that case you might wanna try UTF-8 as the fallback.
-