List of usage examples for com.google.common.base CharMatcher breakingWhitespace
public static CharMatcher breakingWhitespace()
From source file:org.jboss.hal.dmr.ModelNode.java
/** * Creates a new node from a base64 encoded string * * @param encoded The base64 encoded string. * * @return the new model node/*from ww w . ja va2 s . c om*/ */ public static ModelNode fromBase64(String encoded) { // Bloody IE can't cope with line breaks when decoding base64! String safeEncoded = CharMatcher.breakingWhitespace().removeFrom(encoded); ModelNode node = new ModelNode(); String decoded = Base64.decode(safeEncoded); node.readExternal(new DataInput(toBytes(decoded))); return node; }