id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
30,800
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.startsWith
public static boolean startsWith(String str, char prefix) { return str != null && str.length() > 0 && str.charAt(0) == prefix; }
java
public static boolean startsWith(String str, char prefix) { return str != null && str.length() > 0 && str.charAt(0) == prefix; }
[ "public", "static", "boolean", "startsWith", "(", "String", "str", ",", "char", "prefix", ")", "{", "return", "str", "!=", "null", "&&", "str", ".", "length", "(", ")", ">", "0", "&&", "str", ".", "charAt", "(", "0", ")", "==", "prefix", ";", "}" ]
Tests if this string starts with the specified prefix. @param str string to check first char @param prefix the prefix. @return is first of given type
[ "Tests", "if", "this", "string", "starts", "with", "the", "specified", "prefix", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L851-L853
30,801
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.endsWith
public static boolean endsWith(String str, char suffix) { return str != null && str.length() > 0 && str.charAt(str.length() - 1) == suffix; }
java
public static boolean endsWith(String str, char suffix) { return str != null && str.length() > 0 && str.charAt(str.length() - 1) == suffix; }
[ "public", "static", "boolean", "endsWith", "(", "String", "str", ",", "char", "suffix", ")", "{", "return", "str", "!=", "null", "&&", "str", ".", "length", "(", ")", ">", "0", "&&", "str", ".", "charAt", "(", "str", ".", "length", "(", ")", "-", ...
Tests if this string ends with the specified suffix. @param str string to check first char @param suffix the suffix. @return is last of given type
[ "Tests", "if", "this", "string", "ends", "with", "the", "specified", "suffix", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L866-L868
30,802
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.startsWithIgnoreCase
public static boolean startsWithIgnoreCase(final String base, final String start) { if (base.length() < start.length()) { return false; } return base.regionMatches(true, 0, start, 0, start.length()); }
java
public static boolean startsWithIgnoreCase(final String base, final String start) { if (base.length() < start.length()) { return false; } return base.regionMatches(true, 0, start, 0, start.length()); }
[ "public", "static", "boolean", "startsWithIgnoreCase", "(", "final", "String", "base", ",", "final", "String", "start", ")", "{", "if", "(", "base", ".", "length", "(", ")", "<", "start", ".", "length", "(", ")", ")", "{", "return", "false", ";", "}", ...
Helper functions to query a strings start portion. The comparison is case insensitive. @param base the base string. @param start the starting text. @return true, if the string starts with the given starting text.
[ "Helper", "functions", "to", "query", "a", "strings", "start", "portion", ".", "The", "comparison", "is", "case", "insensitive", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L889-L894
30,803
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.endsWithIgnoreCase
public static boolean endsWithIgnoreCase(final String base, final String end) { if (base.length() < end.length()) { return false; } return base.regionMatches(true, base.length() - end.length(), end, 0, end.length()); }
java
public static boolean endsWithIgnoreCase(final String base, final String end) { if (base.length() < end.length()) { return false; } return base.regionMatches(true, base.length() - end.length(), end, 0, end.length()); }
[ "public", "static", "boolean", "endsWithIgnoreCase", "(", "final", "String", "base", ",", "final", "String", "end", ")", "{", "if", "(", "base", ".", "length", "(", ")", "<", "end", ".", "length", "(", ")", ")", "{", "return", "false", ";", "}", "ret...
Helper functions to query a strings end portion. The comparison is case insensitive. @param base the base string. @param end the ending text. @return true, if the string ends with the given ending text.
[ "Helper", "functions", "to", "query", "a", "strings", "end", "portion", ".", "The", "comparison", "is", "case", "insensitive", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L904-L909
30,804
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.toLowerCase
public static String toLowerCase(String str) { int len = str.length(); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))) { return str.toLowerCase(); } } return str; }
java
public static String toLowerCase(String str) { int len = str.length(); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))) { return str.toLowerCase(); } } return str; }
[ "public", "static", "String", "toLowerCase", "(", "String", "str", ")", "{", "int", "len", "=", "str", ".", "length", "(", ")", ";", "char", "c", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "++", ")", "{", "c", "=",...
cast a string a lower case String, is faster than the String.toLowerCase, if all Character are already Low Case @param str @return lower case value
[ "cast", "a", "string", "a", "lower", "case", "String", "is", "faster", "than", "the", "String", ".", "toLowerCase", "if", "all", "Character", "are", "already", "Low", "Case" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L939-L950
30,805
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.lastChar
public static char lastChar(String str) { if (str == null || str.length() == 0) return 0; return str.charAt(str.length() - 1); }
java
public static char lastChar(String str) { if (str == null || str.length() == 0) return 0; return str.charAt(str.length() - 1); }
[ "public", "static", "char", "lastChar", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", "||", "str", ".", "length", "(", ")", "==", "0", ")", "return", "0", ";", "return", "str", ".", "charAt", "(", "str", ".", "length", "(", ")",...
return the last character of a string, if string ist empty return 0; @param str string to get last character @return last character
[ "return", "the", "last", "character", "of", "a", "string", "if", "string", "ist", "empty", "return", "0", ";" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L981-L984
30,806
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.isAllAlpha
public static boolean isAllAlpha(String str) { if (str == null) return false; for (int i = str.length() - 1; i >= 0; i--) { if (!Character.isLetter(str.charAt(i))) return false; } return true; }
java
public static boolean isAllAlpha(String str) { if (str == null) return false; for (int i = str.length() - 1; i >= 0; i--) { if (!Character.isLetter(str.charAt(i))) return false; } return true; }
[ "public", "static", "boolean", "isAllAlpha", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "return", "false", ";", "for", "(", "int", "i", "=", "str", ".", "length", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--"...
returns true if all characters in the string are letters @param str @return
[ "returns", "true", "if", "all", "characters", "in", "the", "string", "are", "letters" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L1236-L1246
30,807
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.isAllUpperCase
public static boolean isAllUpperCase(String str) { if (str == null) return false; boolean hasLetters = false; char c; for (int i = str.length() - 1; i >= 0; i--) { c = str.charAt(i); if (Character.isLetter(c)) { if (!Character.isUpperCase(c)) return false; hasLetters = true; } } return h...
java
public static boolean isAllUpperCase(String str) { if (str == null) return false; boolean hasLetters = false; char c; for (int i = str.length() - 1; i >= 0; i--) { c = str.charAt(i); if (Character.isLetter(c)) { if (!Character.isUpperCase(c)) return false; hasLetters = true; } } return h...
[ "public", "static", "boolean", "isAllUpperCase", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "return", "false", ";", "boolean", "hasLetters", "=", "false", ";", "char", "c", ";", "for", "(", "int", "i", "=", "str", ".", "leng...
returns true if the input string has letters and they are all UPPERCASE @param str @return
[ "returns", "true", "if", "the", "input", "string", "has", "letters", "and", "they", "are", "all", "UPPERCASE" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L1254-L1273
30,808
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.substring
public static String substring(String str, int off, int len) { return str.substring(off, off + len); }
java
public static String substring(String str, int off, int len) { return str.substring(off, off + len); }
[ "public", "static", "String", "substring", "(", "String", "str", ",", "int", "off", ",", "int", "len", ")", "{", "return", "str", ".", "substring", "(", "off", ",", "off", "+", "len", ")", ";", "}" ]
this method works different from the regular substring method, the regular substring method takes startIndex and endIndex as second and third argument, this method takes offset and length @param str @param off @param len @return
[ "this", "method", "works", "different", "from", "the", "regular", "substring", "method", "the", "regular", "substring", "method", "takes", "startIndex", "and", "endIndex", "as", "second", "and", "third", "argument", "this", "method", "takes", "offset", "and", "l...
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L1292-L1294
30,809
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Video.java
Video.setNameconflict
public void setNameconflict(String nameconflict) throws PageException { nameconflict = nameconflict.toLowerCase().trim(); if ("error".equals(nameconflict)) this.nameconflict = NAMECONFLICT_ERROR; else if ("skip".equals(nameconflict)) this.nameconflict = NAMECONFLICT_SKIP; else if ("overwrite".equals(nameconflict)) ...
java
public void setNameconflict(String nameconflict) throws PageException { nameconflict = nameconflict.toLowerCase().trim(); if ("error".equals(nameconflict)) this.nameconflict = NAMECONFLICT_ERROR; else if ("skip".equals(nameconflict)) this.nameconflict = NAMECONFLICT_SKIP; else if ("overwrite".equals(nameconflict)) ...
[ "public", "void", "setNameconflict", "(", "String", "nameconflict", ")", "throws", "PageException", "{", "nameconflict", "=", "nameconflict", ".", "toLowerCase", "(", ")", ".", "trim", "(", ")", ";", "if", "(", "\"error\"", ".", "equals", "(", "nameconflict", ...
set the value nameconflict Action to take if filename is the same as that of a file in the directory. @param nameconflict value to set @throws ApplicationException
[ "set", "the", "value", "nameconflict", "Action", "to", "take", "if", "filename", "is", "the", "same", "as", "that", "of", "a", "file", "in", "the", "directory", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Video.java#L221-L228
30,810
lucee/Lucee
core/src/main/java/lucee/runtime/type/QueryColumnRef.java
QueryColumnRef.touch
public Object touch(int row) throws PageException { Object o = query.getAt(columnName, row, NullSupportHelper.NULL()); if (o != NullSupportHelper.NULL()) return o; return query.setAt(columnName, row, new StructImpl()); }
java
public Object touch(int row) throws PageException { Object o = query.getAt(columnName, row, NullSupportHelper.NULL()); if (o != NullSupportHelper.NULL()) return o; return query.setAt(columnName, row, new StructImpl()); }
[ "public", "Object", "touch", "(", "int", "row", ")", "throws", "PageException", "{", "Object", "o", "=", "query", ".", "getAt", "(", "columnName", ",", "row", ",", "NullSupportHelper", ".", "NULL", "(", ")", ")", ";", "if", "(", "o", "!=", "NullSupport...
touch a value, means if key dosent exist, it will created @param row @return matching value or created value @throws PageException
[ "touch", "a", "value", "means", "if", "key", "dosent", "exist", "it", "will", "created" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/QueryColumnRef.java#L88-L92
30,811
lucee/Lucee
core/src/main/java/lucee/runtime/net/ipsettings/IPRangeCollection.java
IPRangeCollection.findFast
public IPRangeNode findFast(String addr) { InetAddress iaddr; try { iaddr = InetAddress.getByName(addr); } catch (UnknownHostException ex) { return null; } return findFast(iaddr); }
java
public IPRangeNode findFast(String addr) { InetAddress iaddr; try { iaddr = InetAddress.getByName(addr); } catch (UnknownHostException ex) { return null; } return findFast(iaddr); }
[ "public", "IPRangeNode", "findFast", "(", "String", "addr", ")", "{", "InetAddress", "iaddr", ";", "try", "{", "iaddr", "=", "InetAddress", ".", "getByName", "(", "addr", ")", ";", "}", "catch", "(", "UnknownHostException", "ex", ")", "{", "return", "null"...
performs a binary search over sorted list @param addr @return
[ "performs", "a", "binary", "search", "over", "sorted", "list" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ipsettings/IPRangeCollection.java#L138-L152
30,812
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.getConstructorParameterPairIgnoreCase
public static ConstructorParameterPair getConstructorParameterPairIgnoreCase(Class clazz, Object[] parameters) throws NoSuchMethodException { // set all values // Class objectClass=object.getClass(); if (parameters == null) parameters = new Object[0]; // set parameter classes Class[] parameterClasses = new Class[...
java
public static ConstructorParameterPair getConstructorParameterPairIgnoreCase(Class clazz, Object[] parameters) throws NoSuchMethodException { // set all values // Class objectClass=object.getClass(); if (parameters == null) parameters = new Object[0]; // set parameter classes Class[] parameterClasses = new Class[...
[ "public", "static", "ConstructorParameterPair", "getConstructorParameterPairIgnoreCase", "(", "Class", "clazz", ",", "Object", "[", "]", "parameters", ")", "throws", "NoSuchMethodException", "{", "// set all values", "// Class objectClass=object.getClass();", "if", "(", "para...
search the matching constructor to defined parameter list, also translate parameters for matching @param clazz class to get constructo from @param parameters parameter for the constructor @return Constructor parameter pair @throws NoSuchMethodException
[ "search", "the", "matching", "constructor", "to", "defined", "parameter", "list", "also", "translate", "parameters", "for", "matching" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L65-L111
30,813
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.callMethod
public static Object callMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { MethodParameterPair pair = getMethodParameterPairIgnoreCase(object.getClass(), methodName, parameters); return pair.g...
java
public static Object callMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { MethodParameterPair pair = getMethodParameterPairIgnoreCase(object.getClass(), methodName, parameters); return pair.g...
[ "public", "static", "Object", "callMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Object", "[", "]", "parameters", ")", "throws", "NoSuchMethodException", ",", "IllegalArgumentException", ",", "IllegalAccessException", ",", "InvocationTargetExcepti...
call of a method from given object @param object object to call method from @param methodName name of the method to call @param parameters parameter for method @return return value of the method @throws SecurityException @throws NoSuchMethodException @throws IllegalArgumentException @throws IllegalAccessException @thr...
[ "call", "of", "a", "method", "from", "given", "object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L126-L131
30,814
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.getMethodParameterPairIgnoreCase
public static MethodParameterPair getMethodParameterPairIgnoreCase(Class objectClass, String methodName, Object[] parameters) throws NoSuchMethodException { // set all values if (parameters == null) parameters = new Object[0]; // set parameter classes Class[] parameterClasses = new Class[parameters.length]; for (...
java
public static MethodParameterPair getMethodParameterPairIgnoreCase(Class objectClass, String methodName, Object[] parameters) throws NoSuchMethodException { // set all values if (parameters == null) parameters = new Object[0]; // set parameter classes Class[] parameterClasses = new Class[parameters.length]; for (...
[ "public", "static", "MethodParameterPair", "getMethodParameterPairIgnoreCase", "(", "Class", "objectClass", ",", "String", "methodName", ",", "Object", "[", "]", "parameters", ")", "throws", "NoSuchMethodException", "{", "// set all values", "if", "(", "parameters", "==...
search the matching method to defined Method Name, also translate parameters for matching @param objectClass class object where searching method from @param methodName name of the method to search @param parameters whished parameter list @return pair with method matching and parameterlist matching @throws NoSuchMethod...
[ "search", "the", "matching", "method", "to", "defined", "Method", "Name", "also", "translate", "parameters", "for", "matching" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L142-L209
30,815
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.compareClasses
private static Object compareClasses(Object parameter, Class trgClass) { Class srcClass = parameter.getClass(); trgClass = primitiveToWrapperType(trgClass); try { if (parameter instanceof ObjectWrap) parameter = ((ObjectWrap) parameter).getEmbededObject(); // parameter is already ok if (srcClass == ...
java
private static Object compareClasses(Object parameter, Class trgClass) { Class srcClass = parameter.getClass(); trgClass = primitiveToWrapperType(trgClass); try { if (parameter instanceof ObjectWrap) parameter = ((ObjectWrap) parameter).getEmbededObject(); // parameter is already ok if (srcClass == ...
[ "private", "static", "Object", "compareClasses", "(", "Object", "parameter", ",", "Class", "trgClass", ")", "{", "Class", "srcClass", "=", "parameter", ".", "getClass", "(", ")", ";", "trgClass", "=", "primitiveToWrapperType", "(", "trgClass", ")", ";", "try",...
compare parameter with whished parameter class and convert parameter to whished type @param parameter parameter to compare @param trgClass whished type of the parameter @return converted parameter (to whished type) or null
[ "compare", "parameter", "with", "whished", "parameter", "class", "and", "convert", "parameter", "to", "whished", "type" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L218-L266
30,816
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.primitiveToWrapperType
private static Class primitiveToWrapperType(Class clazz) { // boolean, byte, char, short, int, long, float, and double if (clazz == null) return null; else if (clazz.isPrimitive()) { if (clazz.getName().equals("boolean")) return Boolean.class; else if (clazz.getName().equals("byte")) return Byte.class; ...
java
private static Class primitiveToWrapperType(Class clazz) { // boolean, byte, char, short, int, long, float, and double if (clazz == null) return null; else if (clazz.isPrimitive()) { if (clazz.getName().equals("boolean")) return Boolean.class; else if (clazz.getName().equals("byte")) return Byte.class; ...
[ "private", "static", "Class", "primitiveToWrapperType", "(", "Class", "clazz", ")", "{", "// boolean, byte, char, short, int, long, float, and double", "if", "(", "clazz", "==", "null", ")", "return", "null", ";", "else", "if", "(", "clazz", ".", "isPrimitive", "(",...
cast a primitive type class definition to his object reference type @param clazz class object to check and convert if it is of primitive type @return object reference class object
[ "cast", "a", "primitive", "type", "class", "definition", "to", "his", "object", "reference", "type" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L287-L301
30,817
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.getProperty
public static Object getProperty(Object o, String prop) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Field f = getFieldIgnoreCase(o.getClass(), prop); return f.get(o); }
java
public static Object getProperty(Object o, String prop) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Field f = getFieldIgnoreCase(o.getClass(), prop); return f.get(o); }
[ "public", "static", "Object", "getProperty", "(", "Object", "o", ",", "String", "prop", ")", "throws", "NoSuchFieldException", ",", "IllegalArgumentException", ",", "IllegalAccessException", "{", "Field", "f", "=", "getFieldIgnoreCase", "(", "o", ".", "getClass", ...
to get a visible Property of a object @param o Object to invoke @param prop property to call @return property value @throws NoSuchFieldException @throws IllegalArgumentException @throws IllegalAccessException
[ "to", "get", "a", "visible", "Property", "of", "a", "object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L361-L364
30,818
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.setProperty
public static void setProperty(Object o, String prop, Object value) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException { getFieldIgnoreCase(o.getClass(), prop).set(o, value); }
java
public static void setProperty(Object o, String prop, Object value) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException { getFieldIgnoreCase(o.getClass(), prop).set(o, value); }
[ "public", "static", "void", "setProperty", "(", "Object", "o", ",", "String", "prop", ",", "Object", "value", ")", "throws", "IllegalArgumentException", ",", "IllegalAccessException", ",", "NoSuchFieldException", "{", "getFieldIgnoreCase", "(", "o", ".", "getClass",...
assign a value to a visible property of a object @param o Object to assign value to his property @param prop name of property @param value Value to assign @throws IllegalArgumentException @throws IllegalAccessException @throws NoSuchFieldException
[ "assign", "a", "value", "to", "a", "visible", "property", "of", "a", "object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L376-L378
30,819
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.callStaticMethod
public static Object callStaticMethod(Class staticClass, String methodName, Object[] values) throws PageException { if (values == null) values = new Object[0]; MethodParameterPair mp; try { mp = getMethodParameterPairIgnoreCase(staticClass, methodName, values); } catch (NoSuchMethodException e) { throw ...
java
public static Object callStaticMethod(Class staticClass, String methodName, Object[] values) throws PageException { if (values == null) values = new Object[0]; MethodParameterPair mp; try { mp = getMethodParameterPairIgnoreCase(staticClass, methodName, values); } catch (NoSuchMethodException e) { throw ...
[ "public", "static", "Object", "callStaticMethod", "(", "Class", "staticClass", ",", "String", "methodName", ",", "Object", "[", "]", "values", ")", "throws", "PageException", "{", "if", "(", "values", "==", "null", ")", "values", "=", "new", "Object", "[", ...
call of a static method of a Class @param staticClass class how contains method to invoke @param methodName method name to invoke @param values Arguments for the Method @return return value from method @throws PageException
[ "call", "of", "a", "static", "method", "of", "a", "Class" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L409-L431
30,820
lucee/Lucee
core/src/main/java/lucee/runtime/CFMLFactoryImpl.java
CFMLFactoryImpl.resetPageContext
@Override public void resetPageContext() { SystemOut.printDate(config.getOutWriter(), "Reset " + pcs.size() + " Unused PageContexts"); pcs.clear(); Iterator<PageContextImpl> it = runningPcs.values().iterator(); while (it.hasNext()) { it.next().reset(); } }
java
@Override public void resetPageContext() { SystemOut.printDate(config.getOutWriter(), "Reset " + pcs.size() + " Unused PageContexts"); pcs.clear(); Iterator<PageContextImpl> it = runningPcs.values().iterator(); while (it.hasNext()) { it.next().reset(); } }
[ "@", "Override", "public", "void", "resetPageContext", "(", ")", "{", "SystemOut", ".", "printDate", "(", "config", ".", "getOutWriter", "(", ")", ",", "\"Reset \"", "+", "pcs", ".", "size", "(", ")", "+", "\" Unused PageContexts\"", ")", ";", "pcs", ".", ...
reset the PageContexes
[ "reset", "the", "PageContexes" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L110-L118
30,821
lucee/Lucee
core/src/main/java/lucee/runtime/CFMLFactoryImpl.java
CFMLFactoryImpl.checkTimeout
@Override public void checkTimeout() { if (!engine.allowRequestTimeout()) return; // print.e(MonitorState.checkForBlockedThreads(runningPcs.values())); // print.e(MonitorState.checkForBlockedThreads(runningChildPcs.values())); // synchronized (runningPcs) { // int len=runningPcs.size(); // we only terminate...
java
@Override public void checkTimeout() { if (!engine.allowRequestTimeout()) return; // print.e(MonitorState.checkForBlockedThreads(runningPcs.values())); // print.e(MonitorState.checkForBlockedThreads(runningChildPcs.values())); // synchronized (runningPcs) { // int len=runningPcs.size(); // we only terminate...
[ "@", "Override", "public", "void", "checkTimeout", "(", ")", "{", "if", "(", "!", "engine", ".", "allowRequestTimeout", "(", ")", ")", "return", ";", "// print.e(MonitorState.checkForBlockedThreads(runningPcs.values()));", "// print.e(MonitorState.checkForBlockedThreads(runni...
check timeout of all running threads, downgrade also priority from all thread run longer than 10 seconds
[ "check", "timeout", "of", "all", "running", "threads", "downgrade", "also", "priority", "from", "all", "thread", "run", "longer", "than", "10", "seconds" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/CFMLFactoryImpl.java#L282-L331
30,822
lucee/Lucee
loader/src/main/java/com/allaire/cfx/DebugResponse.java
DebugResponse.printResults
public void printResults() { System.out.println("[ --- Lucee Debug Response --- ]"); System.out.println(); System.out.println("----------------------------"); System.out.println("| Output |"); System.out.println("----------------------------"); System.out.println(write); System.out.println(); ...
java
public void printResults() { System.out.println("[ --- Lucee Debug Response --- ]"); System.out.println(); System.out.println("----------------------------"); System.out.println("| Output |"); System.out.println("----------------------------"); System.out.println(write); System.out.println(); ...
[ "public", "void", "printResults", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"[ --- Lucee Debug Response --- ]\"", ")", ";", "System", ".", "out", ".", "println", "(", ")", ";", "System", ".", "out", ".", "println", "(", "\"-----------------...
print out the response
[ "print", "out", "the", "response" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/com/allaire/cfx/DebugResponse.java#L59-L94
30,823
lucee/Lucee
loader/src/main/java/com/allaire/cfx/DebugResponse.java
DebugResponse.printQuery
public void printQuery(final Query query) { if (query != null) { final String[] cols = query.getColumns(); final int rows = query.getRowCount(); System.out.println("[Query:" + query.getName() + "]"); for (int i = 0; i < cols.length; i++) { if (i > 0) System.out.print(", "); System.out.print(col...
java
public void printQuery(final Query query) { if (query != null) { final String[] cols = query.getColumns(); final int rows = query.getRowCount(); System.out.println("[Query:" + query.getName() + "]"); for (int i = 0; i < cols.length; i++) { if (i > 0) System.out.print(", "); System.out.print(col...
[ "public", "void", "printQuery", "(", "final", "Query", "query", ")", "{", "if", "(", "query", "!=", "null", ")", "{", "final", "String", "[", "]", "cols", "=", "query", ".", "getColumns", "(", ")", ";", "final", "int", "rows", "=", "query", ".", "g...
print out a query @param query query to print
[ "print", "out", "a", "query" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/com/allaire/cfx/DebugResponse.java#L101-L120
30,824
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Module.java
Module.toRealPath
private static String[] toRealPath(Config config, String dotPath) throws ExpressionException { dotPath = dotPath.trim(); while (dotPath.indexOf('.') == 0) { dotPath = dotPath.substring(1); } int len = -1; while ((len = dotPath.length()) > 0 && dotPath.lastIndexOf('.') == len - 1) { dotPath = dotPath.sub...
java
private static String[] toRealPath(Config config, String dotPath) throws ExpressionException { dotPath = dotPath.trim(); while (dotPath.indexOf('.') == 0) { dotPath = dotPath.substring(1); } int len = -1; while ((len = dotPath.length()) > 0 && dotPath.lastIndexOf('.') == len - 1) { dotPath = dotPath.sub...
[ "private", "static", "String", "[", "]", "toRealPath", "(", "Config", "config", ",", "String", "dotPath", ")", "throws", "ExpressionException", "{", "dotPath", "=", "dotPath", ".", "trim", "(", ")", ";", "while", "(", "dotPath", ".", "indexOf", "(", "'", ...
translate a dot-notation path to a realpath @param dotPath @return realpath @throws ExpressionException
[ "translate", "a", "dot", "-", "notation", "path", "to", "a", "realpath" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Module.java#L130-L141
30,825
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toDateTime
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolean useCommomDateParserAsWell) throws PageException { DateTime dt = toDateTime(locale, str, tz, null, useCommomDateParserAsWell); if (dt == null) { String prefix = locale.getLanguage() + "-" + locale.getCountry() + "-"; throw new...
java
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, boolean useCommomDateParserAsWell) throws PageException { DateTime dt = toDateTime(locale, str, tz, null, useCommomDateParserAsWell); if (dt == null) { String prefix = locale.getLanguage() + "-" + locale.getCountry() + "-"; throw new...
[ "public", "static", "DateTime", "toDateTime", "(", "Locale", "locale", ",", "String", "str", ",", "TimeZone", "tz", ",", "boolean", "useCommomDateParserAsWell", ")", "throws", "PageException", "{", "DateTime", "dt", "=", "toDateTime", "(", "locale", ",", "str", ...
parse a string to a Datetime Object @param locale @param str String representation of a locale Date @param tz @return DateTime Object @throws PageException
[ "parse", "a", "string", "to", "a", "Datetime", "Object" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L186-L198
30,826
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toDateTime
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, DateTime defaultValue, boolean useCommomDateParserAsWell) { str = str.trim(); tz = ThreadLocalPageContext.getTimeZone(tz); DateFormat[] df; // get Calendar Calendar c = JREDateTimeUtil.getThreadCalendar(locale, tz); // datetime ParsePosi...
java
public static DateTime toDateTime(Locale locale, String str, TimeZone tz, DateTime defaultValue, boolean useCommomDateParserAsWell) { str = str.trim(); tz = ThreadLocalPageContext.getTimeZone(tz); DateFormat[] df; // get Calendar Calendar c = JREDateTimeUtil.getThreadCalendar(locale, tz); // datetime ParsePosi...
[ "public", "static", "DateTime", "toDateTime", "(", "Locale", "locale", ",", "String", "str", ",", "TimeZone", "tz", ",", "DateTime", "defaultValue", ",", "boolean", "useCommomDateParserAsWell", ")", "{", "str", "=", "str", ".", "trim", "(", ")", ";", "tz", ...
parse a string to a Datetime Object, returns null if can't convert @param locale @param str String representation of a locale Date @param tz @param defaultValue @return datetime object
[ "parse", "a", "string", "to", "a", "Datetime", "Object", "returns", "null", "if", "can", "t", "convert" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L229-L289
30,827
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toTime
public static Time toTime(TimeZone timeZone, Object o) throws PageException { if (o instanceof Time) return (Time) o; else if (o instanceof Date) return new TimeImpl((Date) o); else if (o instanceof Castable) return new TimeImpl(((Castable) o).castToDateTime()); else if (o instanceof String) { Time dt = toTime...
java
public static Time toTime(TimeZone timeZone, Object o) throws PageException { if (o instanceof Time) return (Time) o; else if (o instanceof Date) return new TimeImpl((Date) o); else if (o instanceof Castable) return new TimeImpl(((Castable) o).castToDateTime()); else if (o instanceof String) { Time dt = toTime...
[ "public", "static", "Time", "toTime", "(", "TimeZone", "timeZone", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Time", ")", "return", "(", "Time", ")", "o", ";", "else", "if", "(", "o", "instanceof", "Date", "...
converts a Object to a Time Object, returns null if invalid string @param o Object to Convert @return coverted Date Time Object @throws PageException
[ "converts", "a", "Object", "to", "a", "Time", "Object", "returns", "null", "if", "invalid", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L436-L451
30,828
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toTime
public static Time toTime(TimeZone timeZone, String str, Time defaultValue) { if (str == null || str.length() < 3) { return defaultValue; } DateString ds = new DateString(str); // Timestamp if (ds.isCurrent('{') && ds.isLast('}')) { // Time // "^\\{t '([0-9]{1,2}):([0-9]{1,2}):([0-9]{2})'\\}$" ...
java
public static Time toTime(TimeZone timeZone, String str, Time defaultValue) { if (str == null || str.length() < 3) { return defaultValue; } DateString ds = new DateString(str); // Timestamp if (ds.isCurrent('{') && ds.isLast('}')) { // Time // "^\\{t '([0-9]{1,2}):([0-9]{1,2}):([0-9]{2})'\\}$" ...
[ "public", "static", "Time", "toTime", "(", "TimeZone", "timeZone", ",", "String", "str", ",", "Time", "defaultValue", ")", "{", "if", "(", "str", "==", "null", "||", "str", ".", "length", "(", ")", "<", "3", ")", "{", "return", "defaultValue", ";", "...
converts a String to a Time Object, returns null if invalid string @param str String to convert @param defaultValue @return Time Object @throws
[ "converts", "a", "String", "to", "a", "Time", "Object", "returns", "null", "if", "invalid", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L520-L605
30,829
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.parseDateTime
private static DateTime parseDateTime(String str, DateString ds, short convertingType, boolean alsoMonthString, TimeZone timeZone, DateTime defaultValue) { int month = 0; int first = ds.readDigits(); // first if (first == -1) { if (!alsoMonthString) return defaultValue; first = ds.readMonthString(); ...
java
private static DateTime parseDateTime(String str, DateString ds, short convertingType, boolean alsoMonthString, TimeZone timeZone, DateTime defaultValue) { int month = 0; int first = ds.readDigits(); // first if (first == -1) { if (!alsoMonthString) return defaultValue; first = ds.readMonthString(); ...
[ "private", "static", "DateTime", "parseDateTime", "(", "String", "str", ",", "DateString", "ds", ",", "short", "convertingType", ",", "boolean", "alsoMonthString", ",", "TimeZone", "timeZone", ",", "DateTime", "defaultValue", ")", "{", "int", "month", "=", "0", ...
converts a String to a DateTime Object, returns null if invalid string @param str String to convert @param convertingType one of the following values: - CONVERTING_TYPE_NONE: number are not converted at all - CONVERTING_TYPE_YEAR: integers are handled as years - CONVERTING_TYPE_OFFSET: numbers are handled as offset fr...
[ "converts", "a", "String", "to", "a", "DateTime", "Object", "returns", "null", "if", "invalid", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L619-L680
30,830
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.readOffset
private static DateTime readOffset(boolean isPlus, TimeZone timeZone, DateTime dt, int years, int months, int days, int hours, int minutes, int seconds, int milliSeconds, DateString ds, boolean checkAfterLast, DateTime defaultValue) { // timeZone=ThreadLocalPageContext.getTimeZone(timeZone); if (timeZone == null...
java
private static DateTime readOffset(boolean isPlus, TimeZone timeZone, DateTime dt, int years, int months, int days, int hours, int minutes, int seconds, int milliSeconds, DateString ds, boolean checkAfterLast, DateTime defaultValue) { // timeZone=ThreadLocalPageContext.getTimeZone(timeZone); if (timeZone == null...
[ "private", "static", "DateTime", "readOffset", "(", "boolean", "isPlus", ",", "TimeZone", "timeZone", ",", "DateTime", "dt", ",", "int", "years", ",", "int", "months", ",", "int", "days", ",", "int", "hours", ",", "int", "minutes", ",", "int", "seconds", ...
reads a offset definition at the end of a date string @param timeZone @param dt previous parsed date Object @param ds DateString to parse @param defaultValue @return date Object with offset
[ "reads", "a", "offset", "definition", "at", "the", "end", "of", "a", "date", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L1018-L1056
30,831
lucee/Lucee
core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java
CFMLWriterWSPref.printBuffer
synchronized void printBuffer() throws IOException { // TODO: is synchronized really needed here? int len = sb.length(); if (len > 0) { char[] chars = new char[len]; sb.getChars(0, len, chars, 0); sb.setLength(0); super.write(chars, 0, chars.length); } }
java
synchronized void printBuffer() throws IOException { // TODO: is synchronized really needed here? int len = sb.length(); if (len > 0) { char[] chars = new char[len]; sb.getChars(0, len, chars, 0); sb.setLength(0); super.write(chars, 0, chars.length); } }
[ "synchronized", "void", "printBuffer", "(", ")", "throws", "IOException", "{", "// TODO: is synchronized really needed here?", "int", "len", "=", "sb", ".", "length", "(", ")", ";", "if", "(", "len", ">", "0", ")", "{", "char", "[", "]", "chars", "=", "new...
prints the characters from the buffer and resets it TODO: make sure that printBuffer() is called at the end of the stream in case we have some characters there! (flush() ?)
[ "prints", "the", "characters", "from", "the", "buffer", "and", "resets", "it" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java#L79-L87
30,832
lucee/Lucee
core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java
CFMLWriterWSPref.addToBuffer
boolean addToBuffer(char c) throws IOException { int len = sb.length(); if (len == 0 && c != CHAR_LT) return false; // buffer must starts with '<' sb.append(c); // if we reached this point then we will return true if (++len >= minTagLen) { // increment len as it was sampled before we appended c boolean isClos...
java
boolean addToBuffer(char c) throws IOException { int len = sb.length(); if (len == 0 && c != CHAR_LT) return false; // buffer must starts with '<' sb.append(c); // if we reached this point then we will return true if (++len >= minTagLen) { // increment len as it was sampled before we appended c boolean isClos...
[ "boolean", "addToBuffer", "(", "char", "c", ")", "throws", "IOException", "{", "int", "len", "=", "sb", ".", "length", "(", ")", ";", "if", "(", "len", "==", "0", "&&", "c", "!=", "CHAR_LT", ")", "return", "false", ";", "// buffer must starts with '<'", ...
checks if a character is part of an open html tag or close html tag, and if so adds it to the buffer, otherwise returns false. @param c @return true if the char was added to the buffer, false otherwise
[ "checks", "if", "a", "character", "is", "part", "of", "an", "open", "html", "tag", "or", "close", "html", "tag", "and", "if", "so", "adds", "it", "to", "the", "buffer", "otherwise", "returns", "false", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java#L105-L129
30,833
lucee/Lucee
core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java
CFMLWriterWSPref.print
@Override public void print(char c) throws IOException { boolean isWS = Character.isWhitespace(c); if (isWS) { if (isFirstChar) // ignore all WS before non-WS content return; if (c == CHAR_RETURN) // ignore Carriage-Return chars return; if (sb.length() > 0) { printBuffer(); // buffer should n...
java
@Override public void print(char c) throws IOException { boolean isWS = Character.isWhitespace(c); if (isWS) { if (isFirstChar) // ignore all WS before non-WS content return; if (c == CHAR_RETURN) // ignore Carriage-Return chars return; if (sb.length() > 0) { printBuffer(); // buffer should n...
[ "@", "Override", "public", "void", "print", "(", "char", "c", ")", "throws", "IOException", "{", "boolean", "isWS", "=", "Character", ".", "isWhitespace", "(", "c", ")", ";", "if", "(", "isWS", ")", "{", "if", "(", "isFirstChar", ")", "// ignore all WS b...
sends a character to output stream if it is not a consecutive white-space unless we're inside a PRE or TEXTAREA tag. @param c @throws IOException
[ "sends", "a", "character", "to", "output", "stream", "if", "it", "is", "not", "a", "consecutive", "white", "-", "space", "unless", "we", "re", "inside", "a", "PRE", "or", "TEXTAREA", "tag", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/writer/CFMLWriterWSPref.java#L168-L200
30,834
lucee/Lucee
core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java
HtmlEmailImpl.setTextMsg
public HtmlEmailImpl setTextMsg(String aText) throws EmailException { if (StringUtil.isEmpty(aText)) { throw new EmailException("Invalid message supplied"); } this.text = aText; return this; }
java
public HtmlEmailImpl setTextMsg(String aText) throws EmailException { if (StringUtil.isEmpty(aText)) { throw new EmailException("Invalid message supplied"); } this.text = aText; return this; }
[ "public", "HtmlEmailImpl", "setTextMsg", "(", "String", "aText", ")", "throws", "EmailException", "{", "if", "(", "StringUtil", ".", "isEmpty", "(", "aText", ")", ")", "{", "throw", "new", "EmailException", "(", "\"Invalid message supplied\"", ")", ";", "}", "...
Set the text content. @param aText A String. @return An HtmlEmail. @throws EmailException see javax.mail.internet.MimeBodyPart for definitions
[ "Set", "the", "text", "content", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java#L86-L92
30,835
lucee/Lucee
core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java
HtmlEmailImpl.setHtmlMsg
public HtmlEmailImpl setHtmlMsg(String aHtml) throws EmailException { if (StringUtil.isEmpty(aHtml)) { throw new EmailException("Invalid message supplied"); } this.html = aHtml; return this; }
java
public HtmlEmailImpl setHtmlMsg(String aHtml) throws EmailException { if (StringUtil.isEmpty(aHtml)) { throw new EmailException("Invalid message supplied"); } this.html = aHtml; return this; }
[ "public", "HtmlEmailImpl", "setHtmlMsg", "(", "String", "aHtml", ")", "throws", "EmailException", "{", "if", "(", "StringUtil", ".", "isEmpty", "(", "aHtml", ")", ")", "{", "throw", "new", "EmailException", "(", "\"Invalid message supplied\"", ")", ";", "}", "...
Set the HTML content. @param aHtml A String. @return An HtmlEmail. @throws EmailException see javax.mail.internet.MimeBodyPart for definitions
[ "Set", "the", "HTML", "content", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java#L102-L108
30,836
lucee/Lucee
core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java
HtmlEmailImpl.embed
public void embed(URL url, String cid, String name) throws EmailException { // verify that the URL is valid try { InputStream is = url.openStream(); is.close(); } catch (IOException e) { throw new EmailException("Invalid URL"); } MimeBodyPart mbp = new MimeBodyPart(); try { mbp.setDataHandl...
java
public void embed(URL url, String cid, String name) throws EmailException { // verify that the URL is valid try { InputStream is = url.openStream(); is.close(); } catch (IOException e) { throw new EmailException("Invalid URL"); } MimeBodyPart mbp = new MimeBodyPart(); try { mbp.setDataHandl...
[ "public", "void", "embed", "(", "URL", "url", ",", "String", "cid", ",", "String", "name", ")", "throws", "EmailException", "{", "// verify that the URL is valid", "try", "{", "InputStream", "is", "=", "url", ".", "openStream", "(", ")", ";", "is", ".", "c...
Embeds an URL in the HTML. <p> This method allows to embed a file located by an URL into the mail body. It allows, for instance, to add inline images to the email. Inline files may be referenced with a <code>cid:xxxxxx</code> URL, where xxxxxx is the Content-ID returned by the embed function. <p> Example of use:<br> ...
[ "Embeds", "an", "URL", "in", "the", "HTML", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java#L161-L183
30,837
lucee/Lucee
core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java
HtmlEmailImpl.buildMimeMessage
@Override public void buildMimeMessage() throws EmailException { try { // if the email has attachments then the base type is mixed, // otherwise it should be related if (this.isBoolHasAttachments()) { this.buildAttachments(); } else { this.buildNoAttachments(); } } catch (Messa...
java
@Override public void buildMimeMessage() throws EmailException { try { // if the email has attachments then the base type is mixed, // otherwise it should be related if (this.isBoolHasAttachments()) { this.buildAttachments(); } else { this.buildNoAttachments(); } } catch (Messa...
[ "@", "Override", "public", "void", "buildMimeMessage", "(", ")", "throws", "EmailException", "{", "try", "{", "// if the email has attachments then the base type is mixed,", "// otherwise it should be related", "if", "(", "this", ".", "isBoolHasAttachments", "(", ")", ")", ...
Does the work of actually building the email. @exception EmailException if there was an error.
[ "Does", "the", "work", "of", "actually", "building", "the", "email", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/mail/HtmlEmailImpl.java#L191-L208
30,838
lucee/Lucee
core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java
IPSettings.put
public synchronized void put(IPRangeNode<Map> ipr, boolean doCheck) { IPRangeNode parent = ipr.isV4() ? ipv4 : ipv6; parent.addChild(ipr, doCheck); version++; isSorted = false; }
java
public synchronized void put(IPRangeNode<Map> ipr, boolean doCheck) { IPRangeNode parent = ipr.isV4() ? ipv4 : ipv6; parent.addChild(ipr, doCheck); version++; isSorted = false; }
[ "public", "synchronized", "void", "put", "(", "IPRangeNode", "<", "Map", ">", "ipr", ",", "boolean", "doCheck", ")", "{", "IPRangeNode", "parent", "=", "ipr", ".", "isV4", "(", ")", "?", "ipv4", ":", "ipv6", ";", "parent", ".", "addChild", "(", "ipr", ...
all added data should go through this method @param ipr @param doCheck
[ "all", "added", "data", "should", "go", "through", "this", "method" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java#L64-L69
30,839
lucee/Lucee
core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java
IPSettings.get
public IPRangeNode get(InetAddress addr) { if (version == 0) // no data was added return null; IPRangeNode node = isV4(addr) ? ipv4 : ipv6; if (!this.isSorted) this.optimize(); return node.findFast(addr); }
java
public IPRangeNode get(InetAddress addr) { if (version == 0) // no data was added return null; IPRangeNode node = isV4(addr) ? ipv4 : ipv6; if (!this.isSorted) this.optimize(); return node.findFast(addr); }
[ "public", "IPRangeNode", "get", "(", "InetAddress", "addr", ")", "{", "if", "(", "version", "==", "0", ")", "// no data was added", "return", "null", ";", "IPRangeNode", "node", "=", "isV4", "(", "addr", ")", "?", "ipv4", ":", "ipv6", ";", "if", "(", "...
returns a single, best matching node for the given address @param addr @return
[ "returns", "a", "single", "best", "matching", "node", "for", "the", "given", "address" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ipsettings/IPSettings.java#L120-L130
30,840
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentProperties.java
ComponentProperties.getWsdlFile
public String getWsdlFile() { if (meta == null) return null; return (String) meta.get(WSDL_FILE, null); }
java
public String getWsdlFile() { if (meta == null) return null; return (String) meta.get(WSDL_FILE, null); }
[ "public", "String", "getWsdlFile", "(", ")", "{", "if", "(", "meta", "==", "null", ")", "return", "null", ";", "return", "(", "String", ")", "meta", ".", "get", "(", "WSDL_FILE", ",", "null", ")", ";", "}" ]
returns null if there is no wsdlFile defined @return the wsdlFile @throws ExpressionException
[ "returns", "null", "if", "there", "is", "no", "wsdlFile", "defined" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentProperties.java#L78-L81
30,841
lucee/Lucee
core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java
NtpMessage.toByteArray
public byte[] toByteArray() { // All bytes are automatically set to 0 byte[] p = new byte[48]; p[0] = (byte) (leapIndicator << 6 | version << 3 | mode); p[1] = (byte) stratum; p[2] = pollInterval; p[3] = precision; // root delay is a signed 16.16-bit FP, in Java an int is 32-bits int l = (int) (rootDelay * 65...
java
public byte[] toByteArray() { // All bytes are automatically set to 0 byte[] p = new byte[48]; p[0] = (byte) (leapIndicator << 6 | version << 3 | mode); p[1] = (byte) stratum; p[2] = pollInterval; p[3] = precision; // root delay is a signed 16.16-bit FP, in Java an int is 32-bits int l = (int) (rootDelay * 65...
[ "public", "byte", "[", "]", "toByteArray", "(", ")", "{", "// All bytes are automatically set to 0", "byte", "[", "]", "p", "=", "new", "byte", "[", "48", "]", ";", "p", "[", "0", "]", "=", "(", "byte", ")", "(", "leapIndicator", "<<", "6", "|", "ver...
This method constructs the data bytes of a raw NTP packet. @return
[ "This", "method", "constructs", "the", "data", "bytes", "of", "a", "raw", "NTP", "packet", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java#L217-L252
30,842
lucee/Lucee
core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java
NtpMessage.encodeTimestamp
public static void encodeTimestamp(byte[] array, int pointer, double timestamp) { // Converts a double into a 64-bit fixed point for (int i = 0; i < 8; i++) { // 2^24, 2^16, 2^8, .. 2^-32 double base = Math.pow(2, (3 - i) * 8); // Capture byte value array[pointer + i] = (byte) (timestamp / base);...
java
public static void encodeTimestamp(byte[] array, int pointer, double timestamp) { // Converts a double into a 64-bit fixed point for (int i = 0; i < 8; i++) { // 2^24, 2^16, 2^8, .. 2^-32 double base = Math.pow(2, (3 - i) * 8); // Capture byte value array[pointer + i] = (byte) (timestamp / base);...
[ "public", "static", "void", "encodeTimestamp", "(", "byte", "[", "]", "array", ",", "int", "pointer", ",", "double", "timestamp", ")", "{", "// Converts a double into a 64-bit fixed point", "for", "(", "int", "i", "=", "0", ";", "i", "<", "8", ";", "i", "+...
Encodes a timestamp in the specified position in the message @param array @param pointer @param timestamp
[ "Encodes", "a", "timestamp", "in", "the", "specified", "position", "in", "the", "message" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java#L306-L324
30,843
lucee/Lucee
core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java
NtpMessage.referenceIdentifierToString
public static String referenceIdentifierToString(byte[] ref, short stratum, byte version) { // From the RFC 2030: // In the case of NTP Version 3 or Version 4 stratum-0 (unspecified) // or stratum-1 (primary) servers, this is a four-character ASCII // string, left justified and zero padded to 32 bits. if (stratum ...
java
public static String referenceIdentifierToString(byte[] ref, short stratum, byte version) { // From the RFC 2030: // In the case of NTP Version 3 or Version 4 stratum-0 (unspecified) // or stratum-1 (primary) servers, this is a four-character ASCII // string, left justified and zero padded to 32 bits. if (stratum ...
[ "public", "static", "String", "referenceIdentifierToString", "(", "byte", "[", "]", "ref", ",", "short", "stratum", ",", "byte", "version", ")", "{", "// From the RFC 2030:", "// In the case of NTP Version 3 or Version 4 stratum-0 (unspecified)", "// or stratum-1 (primary) serv...
Returns a string representation of a reference identifier according to the rules set out in RFC 2030. @param ref @param stratum @param version @return
[ "Returns", "a", "string", "representation", "of", "a", "reference", "identifier", "according", "to", "the", "rules", "set", "out", "in", "RFC", "2030", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ntp/NtpMessage.java#L361-L384
30,844
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(Object left, Object right) throws PageException { // print.dumpStack(); if (left instanceof String) return compare((String) left, right); else if (left instanceof Number) return compare(((Number) left).doubleValue(), right); else if (left instanceof Boolean) return compare(((Boolean) left)...
java
public static int compare(Object left, Object right) throws PageException { // print.dumpStack(); if (left instanceof String) return compare((String) left, right); else if (left instanceof Number) return compare(((Number) left).doubleValue(), right); else if (left instanceof Boolean) return compare(((Boolean) left)...
[ "public", "static", "int", "compare", "(", "Object", "left", ",", "Object", "right", ")", "throws", "PageException", "{", "// print.dumpStack();", "if", "(", "left", "instanceof", "String", ")", "return", "compare", "(", "(", "String", ")", "left", ",", "rig...
compares two Objects @param left @param right @return different of objects as int @throws PageException
[ "compares", "two", "Objects" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L73-L92
30,845
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(String left, String right) { if (Decision.isNumber(left)) { if (Decision.isNumber(right)) { // long numbers if (left.length() > 9 || right.length() > 9) { try { return new BigDecimal(left).compareTo(new BigDecimal(right)); } catch (Throwable t) { ExceptionUtil...
java
public static int compare(String left, String right) { if (Decision.isNumber(left)) { if (Decision.isNumber(right)) { // long numbers if (left.length() > 9 || right.length() > 9) { try { return new BigDecimal(left).compareTo(new BigDecimal(right)); } catch (Throwable t) { ExceptionUtil...
[ "public", "static", "int", "compare", "(", "String", "left", ",", "String", "right", ")", "{", "if", "(", "Decision", ".", "isNumber", "(", "left", ")", ")", "{", "if", "(", "Decision", ".", "isNumber", "(", "right", ")", ")", "{", "// long numbers", ...
compares a String with a String @param left @param right @return difference as int
[ "compares", "a", "String", "with", "a", "String" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L407-L427
30,846
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(String left, double right) { if (Decision.isNumber(left)) { if (left.length() > 9) { try { return new BigDecimal(left).compareTo(new BigDecimal(Caster.toString(right))); } catch (Exception e) {} } return compare(Caster.toDoubleValue(left, Double.NaN), right); } if...
java
public static int compare(String left, double right) { if (Decision.isNumber(left)) { if (left.length() > 9) { try { return new BigDecimal(left).compareTo(new BigDecimal(Caster.toString(right))); } catch (Exception e) {} } return compare(Caster.toDoubleValue(left, Double.NaN), right); } if...
[ "public", "static", "int", "compare", "(", "String", "left", ",", "double", "right", ")", "{", "if", "(", "Decision", ".", "isNumber", "(", "left", ")", ")", "{", "if", "(", "left", ".", "length", "(", ")", ">", "9", ")", "{", "try", "{", "return...
compares a String with a double @param left @param right @return difference as int
[ "compares", "a", "String", "with", "a", "double" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L436-L452
30,847
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(Date left, String right) throws PageException { if (Decision.isNumber(right)) return compare(left.getTime() / 1000, Caster.toDoubleValue(right)); DateTime dt = DateCaster.toDateAdvanced(right, DateCaster.CONVERTING_TYPE_OFFSET, null, null); if (dt != null) { return compare(left.getTime...
java
public static int compare(Date left, String right) throws PageException { if (Decision.isNumber(right)) return compare(left.getTime() / 1000, Caster.toDoubleValue(right)); DateTime dt = DateCaster.toDateAdvanced(right, DateCaster.CONVERTING_TYPE_OFFSET, null, null); if (dt != null) { return compare(left.getTime...
[ "public", "static", "int", "compare", "(", "Date", "left", ",", "String", "right", ")", "throws", "PageException", "{", "if", "(", "Decision", ".", "isNumber", "(", "right", ")", ")", "return", "compare", "(", "left", ".", "getTime", "(", ")", "/", "10...
compares a Date with a String @param left @param right @return difference as int @throws PageException
[ "compares", "a", "Date", "with", "a", "String" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L584-L591
30,848
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(Date left, double right) { return compare(left.getTime() / 1000, DateTimeUtil.getInstance().toDateTime(right).getTime() / 1000); }
java
public static int compare(Date left, double right) { return compare(left.getTime() / 1000, DateTimeUtil.getInstance().toDateTime(right).getTime() / 1000); }
[ "public", "static", "int", "compare", "(", "Date", "left", ",", "double", "right", ")", "{", "return", "compare", "(", "left", ".", "getTime", "(", ")", "/", "1000", ",", "DateTimeUtil", ".", "getInstance", "(", ")", ".", "toDateTime", "(", "right", ")...
compares a Date with a double @param left @param right @return difference as int
[ "compares", "a", "Date", "with", "a", "double" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L600-L602
30,849
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.compare
public static int compare(Date left, Date right) { return compare(left.getTime() / 1000, right.getTime() / 1000); }
java
public static int compare(Date left, Date right) { return compare(left.getTime() / 1000, right.getTime() / 1000); }
[ "public", "static", "int", "compare", "(", "Date", "left", ",", "Date", "right", ")", "{", "return", "compare", "(", "left", ".", "getTime", "(", ")", "/", "1000", ",", "right", ".", "getTime", "(", ")", "/", "1000", ")", ";", "}" ]
compares a Date with a Date @param left @param right @return difference as int
[ "compares", "a", "Date", "with", "a", "Date" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L622-L624
30,850
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.exponent
public static double exponent(Object left, Object right) throws PageException { return StrictMath.pow(Caster.toDoubleValue(left), Caster.toDoubleValue(right)); }
java
public static double exponent(Object left, Object right) throws PageException { return StrictMath.pow(Caster.toDoubleValue(left), Caster.toDoubleValue(right)); }
[ "public", "static", "double", "exponent", "(", "Object", "left", ",", "Object", "right", ")", "throws", "PageException", "{", "return", "StrictMath", ".", "pow", "(", "Caster", ".", "toDoubleValue", "(", "left", ")", ",", "Caster", ".", "toDoubleValue", "(",...
calculate the exponent of the left value @param left value to get exponent from @param right exponent count @return return expoinended value @throws PageException
[ "calculate", "the", "exponent", "of", "the", "left", "value" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L891-L893
30,851
lucee/Lucee
core/src/main/java/lucee/runtime/op/Operator.java
Operator.concat
public static CharSequence concat(CharSequence left, CharSequence right) { if (left instanceof Appendable) { try { ((Appendable) left).append(right); return left; } catch (IOException e) {} } return new StringBuilder(left).append(right); }
java
public static CharSequence concat(CharSequence left, CharSequence right) { if (left instanceof Appendable) { try { ((Appendable) left).append(right); return left; } catch (IOException e) {} } return new StringBuilder(left).append(right); }
[ "public", "static", "CharSequence", "concat", "(", "CharSequence", "left", ",", "CharSequence", "right", ")", "{", "if", "(", "left", "instanceof", "Appendable", ")", "{", "try", "{", "(", "(", "Appendable", ")", "left", ")", ".", "append", "(", "right", ...
concat 2 CharSequences @param left @param right @return concated String
[ "concat", "2", "CharSequences" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Operator.java#L919-L928
30,852
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ExpressionUtil.java
ExpressionUtil.visitLine
public static void visitLine(BytecodeContext bc, Position pos) { if (pos != null) { visitLine(bc, pos.line); } }
java
public static void visitLine(BytecodeContext bc, Position pos) { if (pos != null) { visitLine(bc, pos.line); } }
[ "public", "static", "void", "visitLine", "(", "BytecodeContext", "bc", ",", "Position", "pos", ")", "{", "if", "(", "pos", "!=", "null", ")", "{", "visitLine", "(", "bc", ",", "pos", ".", "line", ")", ";", "}", "}" ]
visit line number @param adapter @param line @param silent id silent this is ignored for log
[ "visit", "line", "number" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ExpressionUtil.java#L72-L76
30,853
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ExpressionUtil.java
ExpressionUtil.writeOutSilent
public static void writeOutSilent(Expression value, BytecodeContext bc, int mode) throws TransformerException { Position start = value.getStart(); Position end = value.getEnd(); value.setStart(null); value.setEnd(null); value.writeOut(bc, mode); value.setStart(start); value.setEnd(end); }
java
public static void writeOutSilent(Expression value, BytecodeContext bc, int mode) throws TransformerException { Position start = value.getStart(); Position end = value.getEnd(); value.setStart(null); value.setEnd(null); value.writeOut(bc, mode); value.setStart(start); value.setEnd(end); }
[ "public", "static", "void", "writeOutSilent", "(", "Expression", "value", ",", "BytecodeContext", "bc", ",", "int", "mode", ")", "throws", "TransformerException", "{", "Position", "start", "=", "value", ".", "getStart", "(", ")", ";", "Position", "end", "=", ...
write out expression without LNT @param value @param bc @param mode @throws TransformerException
[ "write", "out", "expression", "without", "LNT" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ExpressionUtil.java#L105-L113
30,854
lucee/Lucee
core/src/main/java/lucee/runtime/tag/TagUtil.java
TagUtil.addTagMetaData
public static void addTagMetaData(ConfigWebImpl cw, lucee.commons.io.log.Log log) { if (true) return; PageContextImpl pc = null; try { pc = ThreadUtil.createPageContext(cw, DevNullOutputStream.DEV_NULL_OUTPUT_STREAM, "localhost", "/", "", new Cookie[0], new Pair[0], null, new Pair[0], new StructImpl(), f...
java
public static void addTagMetaData(ConfigWebImpl cw, lucee.commons.io.log.Log log) { if (true) return; PageContextImpl pc = null; try { pc = ThreadUtil.createPageContext(cw, DevNullOutputStream.DEV_NULL_OUTPUT_STREAM, "localhost", "/", "", new Cookie[0], new Pair[0], null, new Pair[0], new StructImpl(), f...
[ "public", "static", "void", "addTagMetaData", "(", "ConfigWebImpl", "cw", ",", "lucee", ".", "commons", ".", "io", ".", "log", ".", "Log", "log", ")", "{", "if", "(", "true", ")", "return", ";", "PageContextImpl", "pc", "=", "null", ";", "try", "{", ...
load metadata from cfc based custom tags and add the info to the tag @param cs @param config
[ "load", "metadata", "from", "cfc", "based", "custom", "tags", "and", "add", "the", "info", "to", "the", "tag" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/TagUtil.java#L257-L286
30,855
lucee/Lucee
core/src/main/java/lucee/runtime/tag/TagUtil.java
TagUtil.invokeBIF
public static Object invokeBIF(PageContext pc, Object[] args, String className, String bundleName, String bundleVersion) throws PageException { try { Class<?> clazz = ClassUtil.loadClassByBundle(className, bundleName, bundleVersion, pc.getConfig().getIdentification()); BIF bif; if (Reflector.isInstaneOf...
java
public static Object invokeBIF(PageContext pc, Object[] args, String className, String bundleName, String bundleVersion) throws PageException { try { Class<?> clazz = ClassUtil.loadClassByBundle(className, bundleName, bundleVersion, pc.getConfig().getIdentification()); BIF bif; if (Reflector.isInstaneOf...
[ "public", "static", "Object", "invokeBIF", "(", "PageContext", "pc", ",", "Object", "[", "]", "args", ",", "String", "className", ",", "String", "bundleName", ",", "String", "bundleVersion", ")", "throws", "PageException", "{", "try", "{", "Class", "<", "?",...
used by the bytecode builded @param pc pageContext @param className @param bundleName @param bundleVersion @return @throws BundleException @throws ClassException
[ "used", "by", "the", "bytecode", "builded" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/TagUtil.java#L357-L370
30,856
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.setCredential
public void setCredential(String username, String password) { if (username != null) { env.put("java.naming.security.principal", username); env.put("java.naming.security.credentials", password); } else { env.remove("java.naming.security.principal"); env.remove("java.naming.security.credentials"); ...
java
public void setCredential(String username, String password) { if (username != null) { env.put("java.naming.security.principal", username); env.put("java.naming.security.credentials", password); } else { env.remove("java.naming.security.principal"); env.remove("java.naming.security.credentials"); ...
[ "public", "void", "setCredential", "(", "String", "username", ",", "String", "password", ")", "{", "if", "(", "username", "!=", "null", ")", "{", "env", ".", "put", "(", "\"java.naming.security.principal\"", ",", "username", ")", ";", "env", ".", "put", "(...
sets username password for the connection @param username @param password
[ "sets", "username", "password", "for", "the", "connection" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L114-L123
30,857
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.setSecureLevel
public void setSecureLevel(short secureLevel) throws ClassException { // Security if (secureLevel == SECURE_CFSSL_BASIC) { env.put("java.naming.security.protocol", "ssl"); env.put("java.naming.ldap.factory.socket", "javax.net.ssl.SSLSocketFactory"); ClassUtil.loadClass("com.sun.net.ssl.internal.ssl.Pro...
java
public void setSecureLevel(short secureLevel) throws ClassException { // Security if (secureLevel == SECURE_CFSSL_BASIC) { env.put("java.naming.security.protocol", "ssl"); env.put("java.naming.ldap.factory.socket", "javax.net.ssl.SSLSocketFactory"); ClassUtil.loadClass("com.sun.net.ssl.internal.ssl.Pro...
[ "public", "void", "setSecureLevel", "(", "short", "secureLevel", ")", "throws", "ClassException", "{", "// Security", "if", "(", "secureLevel", "==", "SECURE_CFSSL_BASIC", ")", "{", "env", ".", "put", "(", "\"java.naming.security.protocol\"", ",", "\"ssl\"", ")", ...
sets the secure Level @param secureLevel [SECURE_CFSSL_BASIC, SECURE_CFSSL_CLIENT_AUTH, SECURE_NONE] @throws ClassNotFoundException @throws ClassException
[ "sets", "the", "secure", "Level" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L132-L151
30,858
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.setReferral
public void setReferral(int referral) { if (referral > 0) { env.put("java.naming.referral", "follow"); env.put("java.naming.ldap.referral.limit", Caster.toString(referral)); } else { env.put("java.naming.referral", "ignore"); env.remove("java.naming.ldap.referral.limit"); } }
java
public void setReferral(int referral) { if (referral > 0) { env.put("java.naming.referral", "follow"); env.put("java.naming.ldap.referral.limit", Caster.toString(referral)); } else { env.put("java.naming.referral", "ignore"); env.remove("java.naming.ldap.referral.limit"); } }
[ "public", "void", "setReferral", "(", "int", "referral", ")", "{", "if", "(", "referral", ">", "0", ")", "{", "env", ".", "put", "(", "\"java.naming.referral\"", ",", "\"follow\"", ")", ";", "env", ".", "put", "(", "\"java.naming.ldap.referral.limit\"", ",",...
sets thr referral @param referral
[ "sets", "thr", "referral" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L158-L167
30,859
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.add
public void add(String dn, String attributes, String delimiter, String seperator) throws NamingException, PageException { DirContext ctx = new InitialDirContext(env); ctx.createSubcontext(dn, toAttributes(attributes, delimiter, seperator)); ctx.close(); }
java
public void add(String dn, String attributes, String delimiter, String seperator) throws NamingException, PageException { DirContext ctx = new InitialDirContext(env); ctx.createSubcontext(dn, toAttributes(attributes, delimiter, seperator)); ctx.close(); }
[ "public", "void", "add", "(", "String", "dn", ",", "String", "attributes", ",", "String", "delimiter", ",", "String", "seperator", ")", "throws", "NamingException", ",", "PageException", "{", "DirContext", "ctx", "=", "new", "InitialDirContext", "(", "env", ")...
adds LDAP entries to LDAP server @param dn @param attributes @param delimiter @throws NamingException @throws PageException
[ "adds", "LDAP", "entries", "to", "LDAP", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L178-L182
30,860
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.delete
public void delete(String dn) throws NamingException { DirContext ctx = new InitialDirContext(env); ctx.destroySubcontext(dn); ctx.close(); }
java
public void delete(String dn) throws NamingException { DirContext ctx = new InitialDirContext(env); ctx.destroySubcontext(dn); ctx.close(); }
[ "public", "void", "delete", "(", "String", "dn", ")", "throws", "NamingException", "{", "DirContext", "ctx", "=", "new", "InitialDirContext", "(", "env", ")", ";", "ctx", ".", "destroySubcontext", "(", "dn", ")", ";", "ctx", ".", "close", "(", ")", ";", ...
deletes LDAP entries on an LDAP server @param dn @throws NamingException
[ "deletes", "LDAP", "entries", "on", "an", "LDAP", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L190-L194
30,861
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.modifydn
public void modifydn(String dn, String attributes) throws NamingException { DirContext ctx = new InitialDirContext(env); ctx.rename(dn, attributes); ctx.close(); }
java
public void modifydn(String dn, String attributes) throws NamingException { DirContext ctx = new InitialDirContext(env); ctx.rename(dn, attributes); ctx.close(); }
[ "public", "void", "modifydn", "(", "String", "dn", ",", "String", "attributes", ")", "throws", "NamingException", "{", "DirContext", "ctx", "=", "new", "InitialDirContext", "(", "env", ")", ";", "ctx", ".", "rename", "(", "dn", ",", "attributes", ")", ";",...
modifies distinguished name attribute for LDAP entries on LDAP server @param dn @param attributes @throws NamingException
[ "modifies", "distinguished", "name", "attribute", "for", "LDAP", "entries", "on", "LDAP", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L203-L207
30,862
lucee/Lucee
core/src/main/java/lucee/runtime/spooler/SpoolerEngineImpl.java
SpoolerEngineImpl.execute
@Override public PageException execute(String id) { SpoolerTask task = getTaskById(openDirectory, id); if (task == null) task = getTaskById(closedDirectory, id); if (task != null) { return execute(task); } return null; }
java
@Override public PageException execute(String id) { SpoolerTask task = getTaskById(openDirectory, id); if (task == null) task = getTaskById(closedDirectory, id); if (task != null) { return execute(task); } return null; }
[ "@", "Override", "public", "PageException", "execute", "(", "String", "id", ")", "{", "SpoolerTask", "task", "=", "getTaskById", "(", "openDirectory", ",", "id", ")", ";", "if", "(", "task", "==", "null", ")", "task", "=", "getTaskById", "(", "closedDirect...
execute task by id and return eror throwd by task @param id
[ "execute", "task", "by", "id", "and", "return", "eror", "throwd", "by", "task" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/spooler/SpoolerEngineImpl.java#L575-L583
30,863
lucee/Lucee
core/src/main/java/lucee/runtime/net/smtp/SMTPClient.java
SMTPClient.add
protected static InternetAddress[] add(InternetAddress[] oldArr, InternetAddress newValue) { if (oldArr == null) return new InternetAddress[] { newValue }; // else { InternetAddress[] tmp = new InternetAddress[oldArr.length + 1]; for (int i = 0; i < oldArr.length; i++) { tmp[i] = oldArr[i]; } tmp[oldArr.leng...
java
protected static InternetAddress[] add(InternetAddress[] oldArr, InternetAddress newValue) { if (oldArr == null) return new InternetAddress[] { newValue }; // else { InternetAddress[] tmp = new InternetAddress[oldArr.length + 1]; for (int i = 0; i < oldArr.length; i++) { tmp[i] = oldArr[i]; } tmp[oldArr.leng...
[ "protected", "static", "InternetAddress", "[", "]", "add", "(", "InternetAddress", "[", "]", "oldArr", ",", "InternetAddress", "newValue", ")", "{", "if", "(", "oldArr", "==", "null", ")", "return", "new", "InternetAddress", "[", "]", "{", "newValue", "}", ...
creates a new expanded array and return it; @param oldArr @param newValue @return new expanded array
[ "creates", "a", "new", "expanded", "array", "and", "return", "it", ";" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/smtp/SMTPClient.java#L368-L378
30,864
lucee/Lucee
core/src/main/java/lucee/runtime/net/smtp/SMTPClient.java
SMTPClient.clean
private static void clean(Config config, Attachment[] attachmentz) { if (attachmentz != null) for (int i = 0; i < attachmentz.length; i++) { if (attachmentz[i].isRemoveAfterSend()) { Resource res = config.getResource(attachmentz[i].getAbsolutePath()); ResourceUtil.removeEL(res, true); } } }
java
private static void clean(Config config, Attachment[] attachmentz) { if (attachmentz != null) for (int i = 0; i < attachmentz.length; i++) { if (attachmentz[i].isRemoveAfterSend()) { Resource res = config.getResource(attachmentz[i].getAbsolutePath()); ResourceUtil.removeEL(res, true); } } }
[ "private", "static", "void", "clean", "(", "Config", "config", ",", "Attachment", "[", "]", "attachmentz", ")", "{", "if", "(", "attachmentz", "!=", "null", ")", "for", "(", "int", "i", "=", "0", ";", "i", "<", "attachmentz", ".", "length", ";", "i",...
remove all atttachements that are marked to remove
[ "remove", "all", "atttachements", "that", "are", "marked", "to", "remove" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/smtp/SMTPClient.java#L925-L932
30,865
lucee/Lucee
core/src/main/java/lucee/commons/lock/rw/RWKeyLock.java
RWKeyLock.isWriteLocked
public Boolean isWriteLocked(K token) { RWLock<K> lock = locks.get(token); if (lock == null) return null; return lock.isWriteLocked(); }
java
public Boolean isWriteLocked(K token) { RWLock<K> lock = locks.get(token); if (lock == null) return null; return lock.isWriteLocked(); }
[ "public", "Boolean", "isWriteLocked", "(", "K", "token", ")", "{", "RWLock", "<", "K", ">", "lock", "=", "locks", ".", "get", "(", "token", ")", ";", "if", "(", "lock", "==", "null", ")", "return", "null", ";", "return", "lock", ".", "isWriteLocked",...
Queries if the write lock is held by any thread on given lock token, returns null when lock with this token does not exists @param token name of the lock to check @return
[ "Queries", "if", "the", "write", "lock", "is", "held", "by", "any", "thread", "on", "given", "lock", "token", "returns", "null", "when", "lock", "with", "this", "token", "does", "not", "exists" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lock/rw/RWKeyLock.java#L111-L115
30,866
lucee/Lucee
core/src/main/java/lucee/commons/i18n/FormatUtil.java
FormatUtil.getCFMLFormats
public static DateFormat[] getCFMLFormats(TimeZone tz, boolean lenient) { String id = "cfml-" + Locale.ENGLISH.toString() + "-" + tz.getID() + "-" + lenient; DateFormat[] df = formats.get(id); if (df == null) { df = new SimpleDateFormat[] { new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH), new...
java
public static DateFormat[] getCFMLFormats(TimeZone tz, boolean lenient) { String id = "cfml-" + Locale.ENGLISH.toString() + "-" + tz.getID() + "-" + lenient; DateFormat[] df = formats.get(id); if (df == null) { df = new SimpleDateFormat[] { new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy", Locale.ENGLISH), new...
[ "public", "static", "DateFormat", "[", "]", "getCFMLFormats", "(", "TimeZone", "tz", ",", "boolean", "lenient", ")", "{", "String", "id", "=", "\"cfml-\"", "+", "Locale", ".", "ENGLISH", ".", "toString", "(", ")", "+", "\"-\"", "+", "tz", ".", "getID", ...
CFML Supported LS Formats @param locale @param tz @param lenient @return
[ "CFML", "Supported", "LS", "Formats" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/i18n/FormatUtil.java#L246-L271
30,867
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Directory.java
Directory.setMode
public void setMode(String mode) throws PageException { try { this.mode = ModeUtil.toOctalMode(mode); } catch (IOException e) { throw Caster.toPageException(e); } }
java
public void setMode(String mode) throws PageException { try { this.mode = ModeUtil.toOctalMode(mode); } catch (IOException e) { throw Caster.toPageException(e); } }
[ "public", "void", "setMode", "(", "String", "mode", ")", "throws", "PageException", "{", "try", "{", "this", ".", "mode", "=", "ModeUtil", ".", "toOctalMode", "(", "mode", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "Caster", "....
set the value mode Used with action = "Create" to define the permissions for a directory on UNIX and Linux platforms. Ignored on Windows. Options correspond to the octal values of the UNIX chmod command. From left to right, permissions are assigned for owner, group, and other. @param mode value to set @throws PageExce...
[ "set", "the", "value", "mode", "Used", "with", "action", "=", "Create", "to", "define", "the", "permissions", "for", "a", "directory", "on", "UNIX", "and", "Linux", "platforms", ".", "Ignored", "on", "Windows", ".", "Options", "correspond", "to", "the", "o...
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Directory.java#L318-L325
30,868
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Directory.java
Directory.setNameconflict
public void setNameconflict(String nameconflict) throws ApplicationException { this.nameconflict = FileUtil.toNameConflict(nameconflict, NAMECONFLICT_UNDEFINED | NAMECONFLICT_ERROR | NAMECONFLICT_OVERWRITE, NAMECONFLICT_DEFAULT); }
java
public void setNameconflict(String nameconflict) throws ApplicationException { this.nameconflict = FileUtil.toNameConflict(nameconflict, NAMECONFLICT_UNDEFINED | NAMECONFLICT_ERROR | NAMECONFLICT_OVERWRITE, NAMECONFLICT_DEFAULT); }
[ "public", "void", "setNameconflict", "(", "String", "nameconflict", ")", "throws", "ApplicationException", "{", "this", ".", "nameconflict", "=", "FileUtil", ".", "toNameConflict", "(", "nameconflict", ",", "NAMECONFLICT_UNDEFINED", "|", "NAMECONFLICT_ERROR", "|", "NA...
set the value nameconflict Action to take if destination directory is the same as that of a file in the directory. @param nameconflict value to set @throws ApplicationException
[ "set", "the", "value", "nameconflict", "Action", "to", "take", "if", "destination", "directory", "is", "the", "same", "as", "that", "of", "a", "file", "in", "the", "directory", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Directory.java#L366-L369
30,869
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Directory.java
Directory.actionRename
public static void actionRename(PageContext pc, Resource directory, String strNewdirectory, String serverPassword, boolean createPath, Object acl, String storage) throws PageException { // check directory SecurityManager securityManager = pc.getConfig().getSecurityManager(); securityManager.checkFileLocation(pc...
java
public static void actionRename(PageContext pc, Resource directory, String strNewdirectory, String serverPassword, boolean createPath, Object acl, String storage) throws PageException { // check directory SecurityManager securityManager = pc.getConfig().getSecurityManager(); securityManager.checkFileLocation(pc...
[ "public", "static", "void", "actionRename", "(", "PageContext", "pc", ",", "Resource", "directory", ",", "String", "strNewdirectory", ",", "String", "serverPassword", ",", "boolean", "createPath", ",", "Object", "acl", ",", "String", "storage", ")", "throws", "P...
rename a directory to a new Name @throws PageException
[ "rename", "a", "directory", "to", "a", "new", "Name" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Directory.java#L737-L769
30,870
lucee/Lucee
core/src/main/java/lucee/commons/lang/CharBuffer.java
CharBuffer.append
public void append(String str) { if (str == null) return; int restLength = buffer.length - pos; if (str.length() < restLength) { str.getChars(0, str.length(), buffer, pos); pos += str.length(); } else { str.getChars(0, restLength, buffer, pos); curr.next = new Entity(buffer); curr = curr.n...
java
public void append(String str) { if (str == null) return; int restLength = buffer.length - pos; if (str.length() < restLength) { str.getChars(0, str.length(), buffer, pos); pos += str.length(); } else { str.getChars(0, restLength, buffer, pos); curr.next = new Entity(buffer); curr = curr.n...
[ "public", "void", "append", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "return", ";", "int", "restLength", "=", "buffer", ".", "length", "-", "pos", ";", "if", "(", "str", ".", "length", "(", ")", "<", "restLength", ")", ...
Method to append a string to char buffer @param str String to append
[ "Method", "to", "append", "a", "string", "to", "char", "buffer" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/CharBuffer.java#L116-L134
30,871
lucee/Lucee
core/src/main/java/lucee/commons/lang/CharBuffer.java
CharBuffer.toCharArray
public char[] toCharArray() { Entity e = root; char[] chrs = new char[size()]; int off = 0; while (e.next != null) { e = e.next; System.arraycopy(e.data, 0, chrs, off, e.data.length); off += e.data.length; } System.arraycopy(buffer, 0, chrs, off, pos); return chrs; }
java
public char[] toCharArray() { Entity e = root; char[] chrs = new char[size()]; int off = 0; while (e.next != null) { e = e.next; System.arraycopy(e.data, 0, chrs, off, e.data.length); off += e.data.length; } System.arraycopy(buffer, 0, chrs, off, pos); return chrs; }
[ "public", "char", "[", "]", "toCharArray", "(", ")", "{", "Entity", "e", "=", "root", ";", "char", "[", "]", "chrs", "=", "new", "char", "[", "size", "(", ")", "]", ";", "int", "off", "=", "0", ";", "while", "(", "e", ".", "next", "!=", "null...
return content of the Char Buffer as char array @return char array
[ "return", "content", "of", "the", "Char", "Buffer", "as", "char", "array" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/CharBuffer.java#L193-L204
30,872
lucee/Lucee
core/src/main/java/lucee/commons/lang/CharBuffer.java
CharBuffer.clear
public void clear() { if (size() == 0) return; buffer = new char[buffer.length]; root.next = null; pos = 0; length = 0; curr = root; }
java
public void clear() { if (size() == 0) return; buffer = new char[buffer.length]; root.next = null; pos = 0; length = 0; curr = root; }
[ "public", "void", "clear", "(", ")", "{", "if", "(", "size", "(", ")", "==", "0", ")", "return", ";", "buffer", "=", "new", "char", "[", "buffer", ".", "length", "]", ";", "root", ".", "next", "=", "null", ";", "pos", "=", "0", ";", "length", ...
clear the content of the buffer
[ "clear", "the", "content", "of", "the", "buffer" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/CharBuffer.java#L214-L221
30,873
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionExistsDir
private AFTPClient actionExistsDir() throws PageException, IOException { required("directory", directory); AFTPClient client = getClient(); boolean res = existsDir(client, directory); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(res)); cfftp.setEL(SUCCEEDED, Boolean.TRUE); sto...
java
private AFTPClient actionExistsDir() throws PageException, IOException { required("directory", directory); AFTPClient client = getClient(); boolean res = existsDir(client, directory); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(res)); cfftp.setEL(SUCCEEDED, Boolean.TRUE); sto...
[ "private", "AFTPClient", "actionExistsDir", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"directory\"", ",", "directory", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "boolean", "res", "=", "existsDir", ...
check if a directory exists or not @return FTPCLient @throws PageException @throws IOException
[ "check", "if", "a", "directory", "exists", "or", "not" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L219-L231
30,874
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionExistsFile
private AFTPClient actionExistsFile() throws PageException, IOException { required("remotefile", remotefile); AFTPClient client = getClient(); FTPFile file = existsFile(client, remotefile, true); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(file != null && file.isFile())); cfft...
java
private AFTPClient actionExistsFile() throws PageException, IOException { required("remotefile", remotefile); AFTPClient client = getClient(); FTPFile file = existsFile(client, remotefile, true); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(file != null && file.isFile())); cfft...
[ "private", "AFTPClient", "actionExistsFile", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"remotefile\"", ",", "remotefile", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "FTPFile", "file", "=", "existsFil...
check if a file exists or not @return FTPCLient @throws IOException @throws PageException
[ "check", "if", "a", "file", "exists", "or", "not" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L240-L253
30,875
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionExists
private AFTPClient actionExists() throws PageException, IOException { required("item", item); AFTPClient client = getClient(); FTPFile file = existsFile(client, item, false); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(file != null)); cfftp.setEL(SUCCEEDED, Boolean.TRUE); ret...
java
private AFTPClient actionExists() throws PageException, IOException { required("item", item); AFTPClient client = getClient(); FTPFile file = existsFile(client, item, false); Struct cfftp = writeCfftp(client); cfftp.setEL(RETURN_VALUE, Caster.toBoolean(file != null)); cfftp.setEL(SUCCEEDED, Boolean.TRUE); ret...
[ "private", "AFTPClient", "actionExists", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"item\"", ",", "item", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "FTPFile", "file", "=", "existsFile", "(", "cl...
check if a file or directory exists @return FTPCLient @throws PageException @throws IOException
[ "check", "if", "a", "file", "or", "directory", "exists" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L262-L273
30,876
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionRemove
private AFTPClient actionRemove() throws IOException, PageException { required("item", item); AFTPClient client = getClient(); client.deleteFile(item); writeCfftp(client); return client; }
java
private AFTPClient actionRemove() throws IOException, PageException { required("item", item); AFTPClient client = getClient(); client.deleteFile(item); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionRemove", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"item\"", ",", "item", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "client", ".", "deleteFile", "(", "item", ")",...
removes a file on the server @return FTPCLient @throws IOException @throws PageException
[ "removes", "a", "file", "on", "the", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L359-L366
30,877
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionRename
private AFTPClient actionRename() throws PageException, IOException { required("existing", existing); required("new", _new); AFTPClient client = getClient(); client.rename(existing, _new); writeCfftp(client); return client; }
java
private AFTPClient actionRename() throws PageException, IOException { required("existing", existing); required("new", _new); AFTPClient client = getClient(); client.rename(existing, _new); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionRename", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"existing\"", ",", "existing", ")", ";", "required", "(", "\"new\"", ",", "_new", ")", ";", "AFTPClient", "client", "=", "getClient", "(",...
rename a file on the server @return FTPCLient @throws PageException @throws IOException
[ "rename", "a", "file", "on", "the", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L375-L384
30,878
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionPutFile
private AFTPClient actionPutFile() throws IOException, PageException { required("remotefile", remotefile); required("localfile", localfile); AFTPClient client = getClient(); Resource local = ResourceUtil.toResourceExisting(pageContext, localfile);// new File(localfile); // if(failifexists && local.exists()) throw...
java
private AFTPClient actionPutFile() throws IOException, PageException { required("remotefile", remotefile); required("localfile", localfile); AFTPClient client = getClient(); Resource local = ResourceUtil.toResourceExisting(pageContext, localfile);// new File(localfile); // if(failifexists && local.exists()) throw...
[ "private", "AFTPClient", "actionPutFile", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"remotefile\"", ",", "remotefile", ")", ";", "required", "(", "\"localfile\"", ",", "localfile", ")", ";", "AFTPClient", "client", "=", "ge...
copy a local file to server @return FTPClient @throws IOException @throws PageException
[ "copy", "a", "local", "file", "to", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L393-L415
30,879
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionGetFile
private AFTPClient actionGetFile() throws PageException, IOException { required("remotefile", remotefile); required("localfile", localfile); AFTPClient client = getClient(); Resource local = ResourceUtil.toResourceExistingParent(pageContext, localfile);// new File(localfile); pageContext.getConfig().getSecurityMa...
java
private AFTPClient actionGetFile() throws PageException, IOException { required("remotefile", remotefile); required("localfile", localfile); AFTPClient client = getClient(); Resource local = ResourceUtil.toResourceExistingParent(pageContext, localfile);// new File(localfile); pageContext.getConfig().getSecurityMa...
[ "private", "AFTPClient", "actionGetFile", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"remotefile\"", ",", "remotefile", ")", ";", "required", "(", "\"localfile\"", ",", "localfile", ")", ";", "AFTPClient", "client", "=", "ge...
gets a file from server and copy it local @return FTPCLient @throws PageException @throws IOException
[ "gets", "a", "file", "from", "server", "and", "copy", "it", "local" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L424-L446
30,880
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionGetCurrentURL
private AFTPClient actionGetCurrentURL() throws PageException, IOException { AFTPClient client = getClient(); String pwd = client.printWorkingDirectory(); Struct cfftp = writeCfftp(client); cfftp.setEL("returnValue", client.getPrefix() + "://" + client.getRemoteAddress().getHostName() + pwd); return client; }
java
private AFTPClient actionGetCurrentURL() throws PageException, IOException { AFTPClient client = getClient(); String pwd = client.printWorkingDirectory(); Struct cfftp = writeCfftp(client); cfftp.setEL("returnValue", client.getPrefix() + "://" + client.getRemoteAddress().getHostName() + pwd); return client; }
[ "private", "AFTPClient", "actionGetCurrentURL", "(", ")", "throws", "PageException", ",", "IOException", "{", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "String", "pwd", "=", "client", ".", "printWorkingDirectory", "(", ")", ";", "Struct", "cfftp",...
get url of the working directory @return FTPCLient @throws IOException @throws PageException
[ "get", "url", "of", "the", "working", "directory" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L455-L461
30,881
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionGetCurrentDir
private AFTPClient actionGetCurrentDir() throws PageException, IOException { AFTPClient client = getClient(); String pwd = client.printWorkingDirectory(); Struct cfftp = writeCfftp(client); cfftp.setEL("returnValue", pwd); return client; }
java
private AFTPClient actionGetCurrentDir() throws PageException, IOException { AFTPClient client = getClient(); String pwd = client.printWorkingDirectory(); Struct cfftp = writeCfftp(client); cfftp.setEL("returnValue", pwd); return client; }
[ "private", "AFTPClient", "actionGetCurrentDir", "(", ")", "throws", "PageException", ",", "IOException", "{", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "String", "pwd", "=", "client", ".", "printWorkingDirectory", "(", ")", ";", "Struct", "cfftp",...
get path from the working directory @return FTPCLient @throws IOException @throws PageException
[ "get", "path", "from", "the", "working", "directory" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L470-L476
30,882
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionChangeDir
private AFTPClient actionChangeDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); client.changeWorkingDirectory(directory); writeCfftp(client); return client; }
java
private AFTPClient actionChangeDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); client.changeWorkingDirectory(directory); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionChangeDir", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"directory\"", ",", "directory", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "client", ".", "changeWorkingDirectory"...
change working directory @return FTPCLient @throws IOException @throws PageException
[ "change", "working", "directory" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L485-L492
30,883
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionRemoveDir
private AFTPClient actionRemoveDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); if (recursive) { removeRecursive(client, directory, FTPFile.DIRECTORY_TYPE); } else client.removeDirectory(directory); writeCfftp(client); return client; }
java
private AFTPClient actionRemoveDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); if (recursive) { removeRecursive(client, directory, FTPFile.DIRECTORY_TYPE); } else client.removeDirectory(directory); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionRemoveDir", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"directory\"", ",", "directory", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "if", "(", "recursive", ")", "{", ...
removes a remote directory on server @return FTPCLient @throws IOException @throws PageException
[ "removes", "a", "remote", "directory", "on", "server" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L505-L516
30,884
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionCreateDir
private AFTPClient actionCreateDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); client.makeDirectory(directory); writeCfftp(client); return client; }
java
private AFTPClient actionCreateDir() throws IOException, PageException { required("directory", directory); AFTPClient client = getClient(); client.makeDirectory(directory); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionCreateDir", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"directory\"", ",", "directory", ")", ";", "AFTPClient", "client", "=", "getClient", "(", ")", ";", "client", ".", "makeDirectory", "(", ...
create a remote directory @return FTPCLient @throws IOException @throws PageException
[ "create", "a", "remote", "directory" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L545-L552
30,885
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionListDir
private AFTPClient actionListDir() throws PageException, IOException { required("name", name); required("directory", directory); AFTPClient client = getClient(); FTPFile[] files = client.listFiles(directory); if (files == null) files = new FTPFile[0]; pageContext.setVariable(name, toQuery(files, "ftp", director...
java
private AFTPClient actionListDir() throws PageException, IOException { required("name", name); required("directory", directory); AFTPClient client = getClient(); FTPFile[] files = client.listFiles(directory); if (files == null) files = new FTPFile[0]; pageContext.setVariable(name, toQuery(files, "ftp", director...
[ "private", "AFTPClient", "actionListDir", "(", ")", "throws", "PageException", ",", "IOException", "{", "required", "(", "\"name\"", ",", "name", ")", ";", "required", "(", "\"directory\"", ",", "directory", ")", ";", "AFTPClient", "client", "=", "getClient", ...
List data of a ftp connection @return FTPCLient @throws PageException @throws IOException
[ "List", "data", "of", "a", "ftp", "connection" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L561-L572
30,886
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionOpen
private AFTPClient actionOpen() throws IOException, PageException { required("server", server); required("username", username); // required("password", password); AFTPClient client = getClient(); writeCfftp(client); return client; }
java
private AFTPClient actionOpen() throws IOException, PageException { required("server", server); required("username", username); // required("password", password); AFTPClient client = getClient(); writeCfftp(client); return client; }
[ "private", "AFTPClient", "actionOpen", "(", ")", "throws", "IOException", ",", "PageException", "{", "required", "(", "\"server\"", ",", "server", ")", ";", "required", "(", "\"username\"", ",", "username", ")", ";", "// required(\"password\", password);", "AFTPClie...
Opens a FTP Connection @return FTPCLinet @throws IOException @throws PageException
[ "Opens", "a", "FTP", "Connection" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L614-L622
30,887
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.actionClose
private AFTPClient actionClose() throws PageException { FTPConnection conn = _createConnection(); AFTPClient client = pool.remove(conn); Struct cfftp = writeCfftp(client); cfftp.setEL("succeeded", Caster.toBoolean(client != null)); return client; }
java
private AFTPClient actionClose() throws PageException { FTPConnection conn = _createConnection(); AFTPClient client = pool.remove(conn); Struct cfftp = writeCfftp(client); cfftp.setEL("succeeded", Caster.toBoolean(client != null)); return client; }
[ "private", "AFTPClient", "actionClose", "(", ")", "throws", "PageException", "{", "FTPConnection", "conn", "=", "_createConnection", "(", ")", ";", "AFTPClient", "client", "=", "pool", ".", "remove", "(", "conn", ")", ";", "Struct", "cfftp", "=", "writeCfftp",...
close a existing ftp connection @return FTPCLient @throws PageException
[ "close", "a", "existing", "ftp", "connection" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L630-L637
30,888
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.writeCfftp
private Struct writeCfftp(AFTPClient client) throws PageException { Struct cfftp = new StructImpl(); if (result == null) pageContext.variablesScope().setEL(CFFTP, cfftp); else pageContext.setVariable(result, cfftp); if (client == null) { cfftp.setEL(SUCCEEDED, Boolean.FALSE); cfftp.setEL(ERROR_CODE, new D...
java
private Struct writeCfftp(AFTPClient client) throws PageException { Struct cfftp = new StructImpl(); if (result == null) pageContext.variablesScope().setEL(CFFTP, cfftp); else pageContext.setVariable(result, cfftp); if (client == null) { cfftp.setEL(SUCCEEDED, Boolean.FALSE); cfftp.setEL(ERROR_CODE, new D...
[ "private", "Struct", "writeCfftp", "(", "AFTPClient", "client", ")", "throws", "PageException", "{", "Struct", "cfftp", "=", "new", "StructImpl", "(", ")", ";", "if", "(", "result", "==", "null", ")", "pageContext", ".", "variablesScope", "(", ")", ".", "s...
writes cfftp variable @param client @return FTPCLient @throws PageException
[ "writes", "cfftp", "variable" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L658-L678
30,889
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.checkCompletion
private boolean checkCompletion(AFTPClient client) throws ApplicationException { boolean isPositiveCompletion = client.isPositiveCompletion(); if (isPositiveCompletion) return false; if (count++ < retrycount) return true; if (stoponerror) { throw new lucee.runtime.exp.FTPException(action, client); } return ...
java
private boolean checkCompletion(AFTPClient client) throws ApplicationException { boolean isPositiveCompletion = client.isPositiveCompletion(); if (isPositiveCompletion) return false; if (count++ < retrycount) return true; if (stoponerror) { throw new lucee.runtime.exp.FTPException(action, client); } return ...
[ "private", "boolean", "checkCompletion", "(", "AFTPClient", "client", ")", "throws", "ApplicationException", "{", "boolean", "isPositiveCompletion", "=", "client", ".", "isPositiveCompletion", "(", ")", ";", "if", "(", "isPositiveCompletion", ")", "return", "false", ...
check completion status of the client @param client @return FTPCLient @throws ApplicationException
[ "check", "completion", "status", "of", "the", "client" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L687-L696
30,890
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.getType
private int getType(Resource file) { if (transferMode == FTPConstant.TRANSFER_MODE_BINARY) return AFTPClient.FILE_TYPE_BINARY; else if (transferMode == FTPConstant.TRANSFER_MODE_ASCCI) return AFTPClient.FILE_TYPE_TEXT; else { String ext = ResourceUtil.getExtension(file, null); if (ext == null || ListUtil.l...
java
private int getType(Resource file) { if (transferMode == FTPConstant.TRANSFER_MODE_BINARY) return AFTPClient.FILE_TYPE_BINARY; else if (transferMode == FTPConstant.TRANSFER_MODE_ASCCI) return AFTPClient.FILE_TYPE_TEXT; else { String ext = ResourceUtil.getExtension(file, null); if (ext == null || ListUtil.l...
[ "private", "int", "getType", "(", "Resource", "file", ")", "{", "if", "(", "transferMode", "==", "FTPConstant", ".", "TRANSFER_MODE_BINARY", ")", "return", "AFTPClient", ".", "FILE_TYPE_BINARY", ";", "else", "if", "(", "transferMode", "==", "FTPConstant", ".", ...
get FTP. ... _FILE_TYPE @param file @return type
[ "get", "FTP", ".", "...", "_FILE_TYPE" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L704-L712
30,891
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/statement/Condition.java
Condition.addElseIf
public Pair addElseIf(ExprBoolean condition, Statement body, Position start, Position end) { Pair pair; ifs.add(pair = new Pair(condition, body, start, end)); body.setParent(this); return pair; }
java
public Pair addElseIf(ExprBoolean condition, Statement body, Position start, Position end) { Pair pair; ifs.add(pair = new Pair(condition, body, start, end)); body.setParent(this); return pair; }
[ "public", "Pair", "addElseIf", "(", "ExprBoolean", "condition", ",", "Statement", "body", ",", "Position", "start", ",", "Position", "end", ")", "{", "Pair", "pair", ";", "ifs", ".", "add", "(", "pair", "=", "new", "Pair", "(", "condition", ",", "body", ...
adds a else statement @param condition @param body
[ "adds", "a", "else", "statement" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/statement/Condition.java#L75-L80
30,892
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/statement/Condition.java
Condition.setElse
public Pair setElse(Statement body, Position start, Position end) { _else = new Pair(null, body, start, end); body.setParent(this); return _else; }
java
public Pair setElse(Statement body, Position start, Position end) { _else = new Pair(null, body, start, end); body.setParent(this); return _else; }
[ "public", "Pair", "setElse", "(", "Statement", "body", ",", "Position", "start", ",", "Position", "end", ")", "{", "_else", "=", "new", "Pair", "(", "null", ",", "body", ",", "start", ",", "end", ")", ";", "body", ".", "setParent", "(", "this", ")", ...
sets the else Block of the condition @param body
[ "sets", "the", "else", "Block", "of", "the", "condition" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/statement/Condition.java#L87-L91
30,893
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/StructUtil.java
StructUtil.copy
public static void copy(Struct source, Struct target, boolean overwrite) { Iterator<Entry<Key, Object>> it = source.entryIterator(); Entry<Key, Object> e; while (it.hasNext()) { e = it.next(); if (overwrite || !target.containsKey(e.getKey())) target.setEL(e.getKey(), e.getValue()); } }
java
public static void copy(Struct source, Struct target, boolean overwrite) { Iterator<Entry<Key, Object>> it = source.entryIterator(); Entry<Key, Object> e; while (it.hasNext()) { e = it.next(); if (overwrite || !target.containsKey(e.getKey())) target.setEL(e.getKey(), e.getValue()); } }
[ "public", "static", "void", "copy", "(", "Struct", "source", ",", "Struct", "target", ",", "boolean", "overwrite", ")", "{", "Iterator", "<", "Entry", "<", "Key", ",", "Object", ">", ">", "it", "=", "source", ".", "entryIterator", "(", ")", ";", "Entry...
copy data from source struct to target struct @param source @param target @param overwrite overwrite data if exist in target
[ "copy", "data", "from", "source", "struct", "to", "target", "struct" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/StructUtil.java#L68-L75
30,894
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/StructUtil.java
StructUtil.values
public static java.util.Collection<?> values(Struct sct) { ArrayList<Object> arr = new ArrayList<Object>(); // Key[] keys = sct.keys(); Iterator<Object> it = sct.valueIterator(); while (it.hasNext()) { arr.add(it.next()); } return arr; }
java
public static java.util.Collection<?> values(Struct sct) { ArrayList<Object> arr = new ArrayList<Object>(); // Key[] keys = sct.keys(); Iterator<Object> it = sct.valueIterator(); while (it.hasNext()) { arr.add(it.next()); } return arr; }
[ "public", "static", "java", ".", "util", ".", "Collection", "<", "?", ">", "values", "(", "Struct", "sct", ")", "{", "ArrayList", "<", "Object", ">", "arr", "=", "new", "ArrayList", "<", "Object", ">", "(", ")", ";", "// Key[] keys = sct.keys();", "Itera...
create a value return value out of a struct @param sct @return
[ "create", "a", "value", "return", "value", "out", "of", "a", "struct" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/StructUtil.java#L193-L201
30,895
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/StructUtil.java
StructUtil.sizeOf
public static long sizeOf(Struct sct) { Iterator<Entry<Key, Object>> it = sct.entryIterator(); Entry<Key, Object> e; long size = 0; while (it.hasNext()) { e = it.next(); size += SizeOf.size(e.getKey()); size += SizeOf.size(e.getValue()); } return size; }
java
public static long sizeOf(Struct sct) { Iterator<Entry<Key, Object>> it = sct.entryIterator(); Entry<Key, Object> e; long size = 0; while (it.hasNext()) { e = it.next(); size += SizeOf.size(e.getKey()); size += SizeOf.size(e.getValue()); } return size; }
[ "public", "static", "long", "sizeOf", "(", "Struct", "sct", ")", "{", "Iterator", "<", "Entry", "<", "Key", ",", "Object", ">", ">", "it", "=", "sct", ".", "entryIterator", "(", ")", ";", "Entry", "<", "Key", ",", "Object", ">", "e", ";", "long", ...
return the size of given struct, size of values + keys @param sct @return
[ "return", "the", "size", "of", "given", "struct", "size", "of", "values", "+", "keys" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/StructUtil.java#L220-L230
30,896
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/StructUtil.java
StructUtil.removeValue
public static void removeValue(Map map, Object value) { Iterator it = map.entrySet().iterator(); Map.Entry entry; while (it.hasNext()) { entry = (Entry) it.next(); if (entry.getValue() == value) it.remove(); } }
java
public static void removeValue(Map map, Object value) { Iterator it = map.entrySet().iterator(); Map.Entry entry; while (it.hasNext()) { entry = (Entry) it.next(); if (entry.getValue() == value) it.remove(); } }
[ "public", "static", "void", "removeValue", "(", "Map", "map", ",", "Object", "value", ")", "{", "Iterator", "it", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "Map", ".", "Entry", "entry", ";", "while", "(", "it", ".", "ha...
remove every entry hat has this value @param map @param obj
[ "remove", "every", "entry", "hat", "has", "this", "value" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/StructUtil.java#L246-L253
30,897
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/statement/tag/TagOutput.java
TagOutput.writeOutTypeNormal
private void writeOutTypeNormal(BytecodeContext bc) throws TransformerException { ParseBodyVisitor pbv = new ParseBodyVisitor(); pbv.visitBegin(bc); getBody().writeOut(bc); pbv.visitEnd(bc); }
java
private void writeOutTypeNormal(BytecodeContext bc) throws TransformerException { ParseBodyVisitor pbv = new ParseBodyVisitor(); pbv.visitBegin(bc); getBody().writeOut(bc); pbv.visitEnd(bc); }
[ "private", "void", "writeOutTypeNormal", "(", "BytecodeContext", "bc", ")", "throws", "TransformerException", "{", "ParseBodyVisitor", "pbv", "=", "new", "ParseBodyVisitor", "(", ")", ";", "pbv", ".", "visitBegin", "(", "bc", ")", ";", "getBody", "(", ")", "."...
write out normal query @param adapter @throws TemplateException
[ "write", "out", "normal", "query" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/statement/tag/TagOutput.java#L100-L105
30,898
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Table.java
Table.setQuery
public void setQuery(String query) throws PageException { this.query = Caster.toQuery(pageContext.getVariable(query)); }
java
public void setQuery(String query) throws PageException { this.query = Caster.toQuery(pageContext.getVariable(query)); }
[ "public", "void", "setQuery", "(", "String", "query", ")", "throws", "PageException", "{", "this", ".", "query", "=", "Caster", ".", "toQuery", "(", "pageContext", ".", "getVariable", "(", "query", ")", ")", ";", "}" ]
set the value query Name of the cfquery from which to draw data. @param query value to set @throws PageException
[ "set", "the", "value", "query", "Name", "of", "the", "cfquery", "from", "which", "to", "draw", "data", "." ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Table.java#L113-L115
30,899
ronmamo/reflections
src/main/java/org/reflections/Reflections.java
Reflections.merge
public Reflections merge(final Reflections reflections) { if (reflections.store != null) { for (String indexName : reflections.store.keySet()) { Multimap<String, String> index = reflections.store.get(indexName); for (String key : index.keySet()) { ...
java
public Reflections merge(final Reflections reflections) { if (reflections.store != null) { for (String indexName : reflections.store.keySet()) { Multimap<String, String> index = reflections.store.get(indexName); for (String key : index.keySet()) { ...
[ "public", "Reflections", "merge", "(", "final", "Reflections", "reflections", ")", "{", "if", "(", "reflections", ".", "store", "!=", "null", ")", "{", "for", "(", "String", "indexName", ":", "reflections", ".", "store", ".", "keySet", "(", ")", ")", "{"...
merges a Reflections instance metadata into this instance
[ "merges", "a", "Reflections", "instance", "metadata", "into", "this", "instance" ]
084cf4a759a06d88e88753ac00397478c2e0ed52
https://github.com/ronmamo/reflections/blob/084cf4a759a06d88e88753ac00397478c2e0ed52/src/main/java/org/reflections/Reflections.java#L356-L368