public class RockerUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.lang3.text.translate.CharSequenceTranslator |
ESCAPE_JAVA
copied from commons lang, but without Unicode escaper anyway whether you
have unicode in your template or not in last case you would like to have
a pretty-generated comments for debug
|
| Constructor and Description |
|---|
RockerUtil() |
public static final org.apache.commons.lang3.text.translate.CharSequenceTranslator ESCAPE_JAVA
public static boolean isJava8Plus(TemplateModel model)
public static boolean isJavaIdentifier(String identifier)
public static int countChars(String value, char ch)
public static boolean isWhitespaceNoLineBreak(char c)
public static boolean isWhitespace(char c)
public static boolean isWhitespace(String s)
public static ContentType templateNameToContentType(String templateName)
public static Collection<File> listFileTree(File dir)
public static List<String> getTextAsJavaByteArrayInitializer(String text, String charsetName, int maxArraySize) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static void appendByteAsJavaByteInitializer(StringBuilder sb, byte b)
public static String md5(File f) throws IOException
IOExceptionpublic static String byteArrayToHex(byte[] a)
Copyright © 2016–2020 Fizzed, Inc. All rights reserved.