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
44,200
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Offering.java
Offering.addProperty
public boolean addProperty(String propertyName, String property) { boolean ret = this.properties.containsKey(propertyName); this.properties.put(propertyName, property); return ret; }
java
public boolean addProperty(String propertyName, String property) { boolean ret = this.properties.containsKey(propertyName); this.properties.put(propertyName, property); return ret; }
[ "public", "boolean", "addProperty", "(", "String", "propertyName", ",", "String", "property", ")", "{", "boolean", "ret", "=", "this", ".", "properties", ".", "containsKey", "(", "propertyName", ")", ";", "this", ".", "properties", ".", "put", "(", "property...
Used to add a new property to the offering @param propertyName the name of the property @param property the value of the property @return true if the property was already present (and it has been replaced), false otherwise
[ "Used", "to", "add", "a", "new", "property", "to", "the", "offering" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Offering.java#L56-L60
44,201
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Offering.java
Offering.sanitizeName
public static String sanitizeName(String name) { if (name == null) throw new NullPointerException("Parameter name cannot be null"); name = name.trim(); if (name.length() == 0) throw new IllegalArgumentException("Parameter name cannot be empty"); StringBuilder...
java
public static String sanitizeName(String name) { if (name == null) throw new NullPointerException("Parameter name cannot be null"); name = name.trim(); if (name.length() == 0) throw new IllegalArgumentException("Parameter name cannot be empty"); StringBuilder...
[ "public", "static", "String", "sanitizeName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"Parameter name cannot be null\"", ")", ";", "name", "=", "name", ".", "trim", "(", ")", ";", ...
Sanitizes a name by replacing every not alphanumeric character with '_' @param name the name of the offerings @return the sanitized name
[ "Sanitizes", "a", "name", "by", "replacing", "every", "not", "alphanumeric", "character", "with", "_" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/Offering.java#L143-L166
44,202
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getUtf8AsString
public String getUtf8AsString(int index) { Utf8Constant utf8 = (Utf8Constant) _entries.get(index); if (utf8 == null) return null; else return utf8.getValue(); }
java
public String getUtf8AsString(int index) { Utf8Constant utf8 = (Utf8Constant) _entries.get(index); if (utf8 == null) return null; else return utf8.getValue(); }
[ "public", "String", "getUtf8AsString", "(", "int", "index", ")", "{", "Utf8Constant", "utf8", "=", "(", "Utf8Constant", ")", "_entries", ".", "get", "(", "index", ")", ";", "if", "(", "utf8", "==", "null", ")", "return", "null", ";", "else", "return", ...
Returns a utf-8 constant as a string
[ "Returns", "a", "utf", "-", "8", "constant", "as", "a", "string" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L176-L184
44,203
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addConstant
public void addConstant(ConstantPoolEntry entry) { if (entry instanceof Utf8Constant) { Utf8Constant utf8 = (Utf8Constant) entry; _utf8Map.put(utf8.getValue(), utf8); } _entries.add(entry); }
java
public void addConstant(ConstantPoolEntry entry) { if (entry instanceof Utf8Constant) { Utf8Constant utf8 = (Utf8Constant) entry; _utf8Map.put(utf8.getValue(), utf8); } _entries.add(entry); }
[ "public", "void", "addConstant", "(", "ConstantPoolEntry", "entry", ")", "{", "if", "(", "entry", "instanceof", "Utf8Constant", ")", "{", "Utf8Constant", "utf8", "=", "(", "Utf8Constant", ")", "entry", ";", "_utf8Map", ".", "put", "(", "utf8", ".", "getValue...
Adds a new constant.
[ "Adds", "a", "new", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L189-L198
44,204
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addUTF8
public Utf8Constant addUTF8(String value) { Utf8Constant entry = getUTF8(value); if (entry != null) return entry; entry = new Utf8Constant(this, _entries.size(), value); addConstant(entry); return entry; }
java
public Utf8Constant addUTF8(String value) { Utf8Constant entry = getUTF8(value); if (entry != null) return entry; entry = new Utf8Constant(this, _entries.size(), value); addConstant(entry); return entry; }
[ "public", "Utf8Constant", "addUTF8", "(", "String", "value", ")", "{", "Utf8Constant", "entry", "=", "getUTF8", "(", "value", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "entry", "=", "new", "Utf8Constant", "(", "this", ",", ...
Adds a UTF-8 constant.
[ "Adds", "a", "UTF", "-", "8", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L211-L223
44,205
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getString
public StringConstant getString(String name) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof StringConstant)) continue; StringConstant stringEntry = (StringConstant) entry; if (stringEntry.getString().equals(name))...
java
public StringConstant getString(String name) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof StringConstant)) continue; StringConstant stringEntry = (StringConstant) entry; if (stringEntry.getString().equals(name))...
[ "public", "StringConstant", "getString", "(", "String", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", "(", ...
Gets a string constant.
[ "Gets", "a", "string", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L228-L243
44,206
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addString
public StringConstant addString(String name) { StringConstant entry = getString(name); if (entry != null) { return entry; } Utf8Constant utf8 = addUTF8(name); entry = new StringConstant(this, _entries.size(), utf8.getIndex()); addConstant(entry); return entry; }
java
public StringConstant addString(String name) { StringConstant entry = getString(name); if (entry != null) { return entry; } Utf8Constant utf8 = addUTF8(name); entry = new StringConstant(this, _entries.size(), utf8.getIndex()); addConstant(entry); return entry; }
[ "public", "StringConstant", "addString", "(", "String", "name", ")", "{", "StringConstant", "entry", "=", "getString", "(", "name", ")", ";", "if", "(", "entry", "!=", "null", ")", "{", "return", "entry", ";", "}", "Utf8Constant", "utf8", "=", "addUTF8", ...
Adds a string constant.
[ "Adds", "a", "string", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L248-L263
44,207
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getIntegerByValue
public IntegerConstant getIntegerByValue(int value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof IntegerConstant)) continue; IntegerConstant integerEntry = (IntegerConstant) entry; if (integerEntry.getValue() ==...
java
public IntegerConstant getIntegerByValue(int value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof IntegerConstant)) continue; IntegerConstant integerEntry = (IntegerConstant) entry; if (integerEntry.getValue() ==...
[ "public", "IntegerConstant", "getIntegerByValue", "(", "int", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", ...
Gets a integer constant.
[ "Gets", "a", "integer", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L268-L283
44,208
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addInteger
public IntegerConstant addInteger(int value) { IntegerConstant entry = getIntegerByValue(value); if (entry != null) return entry; entry = new IntegerConstant(this, _entries.size(), value); addConstant(entry); return entry; }
java
public IntegerConstant addInteger(int value) { IntegerConstant entry = getIntegerByValue(value); if (entry != null) return entry; entry = new IntegerConstant(this, _entries.size(), value); addConstant(entry); return entry; }
[ "public", "IntegerConstant", "addInteger", "(", "int", "value", ")", "{", "IntegerConstant", "entry", "=", "getIntegerByValue", "(", "value", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "entry", "=", "new", "IntegerConstant", "("...
Adds a integer constant.
[ "Adds", "a", "integer", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L288-L300
44,209
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getLongByValue
public LongConstant getLongByValue(long value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof LongConstant)) continue; LongConstant longEntry = (LongConstant) entry; if (longEntry.getValue() == value) retu...
java
public LongConstant getLongByValue(long value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof LongConstant)) continue; LongConstant longEntry = (LongConstant) entry; if (longEntry.getValue() == value) retu...
[ "public", "LongConstant", "getLongByValue", "(", "long", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", "(", ...
Gets a long constant.
[ "Gets", "a", "long", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L305-L320
44,210
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addLong
public LongConstant addLong(long value) { LongConstant entry = getLongByValue(value); if (entry != null) return entry; entry = new LongConstant(this, _entries.size(), value); addConstant(entry); addConstant(null); return entry; }
java
public LongConstant addLong(long value) { LongConstant entry = getLongByValue(value); if (entry != null) return entry; entry = new LongConstant(this, _entries.size(), value); addConstant(entry); addConstant(null); return entry; }
[ "public", "LongConstant", "addLong", "(", "long", "value", ")", "{", "LongConstant", "entry", "=", "getLongByValue", "(", "value", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "entry", "=", "new", "LongConstant", "(", "this", ...
Adds a long constant.
[ "Adds", "a", "long", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L325-L338
44,211
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getFloatByValue
public FloatConstant getFloatByValue(float value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof FloatConstant)) continue; FloatConstant floatEntry = (FloatConstant) entry; if (floatEntry.getValue() == value) ...
java
public FloatConstant getFloatByValue(float value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof FloatConstant)) continue; FloatConstant floatEntry = (FloatConstant) entry; if (floatEntry.getValue() == value) ...
[ "public", "FloatConstant", "getFloatByValue", "(", "float", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", "(...
Gets a float constant.
[ "Gets", "a", "float", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L343-L358
44,212
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addFloat
public FloatConstant addFloat(float value) { FloatConstant entry = getFloatByValue(value); if (entry != null) return entry; entry = new FloatConstant(this, _entries.size(), value); addConstant(entry); return entry; }
java
public FloatConstant addFloat(float value) { FloatConstant entry = getFloatByValue(value); if (entry != null) return entry; entry = new FloatConstant(this, _entries.size(), value); addConstant(entry); return entry; }
[ "public", "FloatConstant", "addFloat", "(", "float", "value", ")", "{", "FloatConstant", "entry", "=", "getFloatByValue", "(", "value", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "entry", "=", "new", "FloatConstant", "(", "thi...
Adds a float constant.
[ "Adds", "a", "float", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L363-L375
44,213
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getDoubleByValue
public DoubleConstant getDoubleByValue(double value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof DoubleConstant)) continue; DoubleConstant doubleEntry = (DoubleConstant) entry; if (doubleEntry.getValue() == val...
java
public DoubleConstant getDoubleByValue(double value) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof DoubleConstant)) continue; DoubleConstant doubleEntry = (DoubleConstant) entry; if (doubleEntry.getValue() == val...
[ "public", "DoubleConstant", "getDoubleByValue", "(", "double", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", ...
Gets a double constant.
[ "Gets", "a", "double", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L380-L395
44,214
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addDouble
public DoubleConstant addDouble(double value) { DoubleConstant entry = getDoubleByValue(value); if (entry != null) return entry; entry = new DoubleConstant(this, _entries.size(), value); addConstant(entry); addConstant(null); return entry; }
java
public DoubleConstant addDouble(double value) { DoubleConstant entry = getDoubleByValue(value); if (entry != null) return entry; entry = new DoubleConstant(this, _entries.size(), value); addConstant(entry); addConstant(null); return entry; }
[ "public", "DoubleConstant", "addDouble", "(", "double", "value", ")", "{", "DoubleConstant", "entry", "=", "getDoubleByValue", "(", "value", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "entry", "=", "new", "DoubleConstant", "(", ...
Adds a double constant.
[ "Adds", "a", "double", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L400-L413
44,215
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getClass
public ClassConstant getClass(String name) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof ClassConstant)) continue; ClassConstant classEntry = (ClassConstant) entry; if (classEntry.getName().equals(name)) ...
java
public ClassConstant getClass(String name) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof ClassConstant)) continue; ClassConstant classEntry = (ClassConstant) entry; if (classEntry.getName().equals(name)) ...
[ "public", "ClassConstant", "getClass", "(", "String", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", "_entries", ".", "get", "(", "i...
Gets a class constant.
[ "Gets", "a", "class", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L418-L433
44,216
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addClass
public ClassConstant addClass(String name) { ClassConstant entry = getClass(name); if (entry != null) return entry; Utf8Constant utf8 = addUTF8(name); entry = new ClassConstant(this, _entries.size(), utf8.getIndex()); addConstant(entry); return entry; }
java
public ClassConstant addClass(String name) { ClassConstant entry = getClass(name); if (entry != null) return entry; Utf8Constant utf8 = addUTF8(name); entry = new ClassConstant(this, _entries.size(), utf8.getIndex()); addConstant(entry); return entry; }
[ "public", "ClassConstant", "addClass", "(", "String", "name", ")", "{", "ClassConstant", "entry", "=", "getClass", "(", "name", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";", "Utf8Constant", "utf8", "=", "addUTF8", "(", "name", ...
Adds a class constant.
[ "Adds", "a", "class", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L438-L452
44,217
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getNameAndType
public NameAndTypeConstant getNameAndType(String name, String type) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof NameAndTypeConstant)) continue; NameAndTypeConstant methodEntry = (NameAndTypeConstant) entry; if ...
java
public NameAndTypeConstant getNameAndType(String name, String type) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof NameAndTypeConstant)) continue; NameAndTypeConstant methodEntry = (NameAndTypeConstant) entry; if ...
[ "public", "NameAndTypeConstant", "getNameAndType", "(", "String", "name", ",", "String", "type", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPoolEntry", "entry", "=", ...
Gets a name-and-type constant.
[ "Gets", "a", "name", "-", "and", "-", "type", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L457-L473
44,218
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addNameAndType
public NameAndTypeConstant addNameAndType(String name, String type) { NameAndTypeConstant entry = getNameAndType(name, type); if (entry != null) return entry; Utf8Constant nameEntry = addUTF8(name); Utf8Constant typeEntry = addUTF8(type); entry = new NameAndTypeConstant(this, _entries.siz...
java
public NameAndTypeConstant addNameAndType(String name, String type) { NameAndTypeConstant entry = getNameAndType(name, type); if (entry != null) return entry; Utf8Constant nameEntry = addUTF8(name); Utf8Constant typeEntry = addUTF8(type); entry = new NameAndTypeConstant(this, _entries.siz...
[ "public", "NameAndTypeConstant", "addNameAndType", "(", "String", "name", ",", "String", "type", ")", "{", "NameAndTypeConstant", "entry", "=", "getNameAndType", "(", "name", ",", "type", ")", ";", "if", "(", "entry", "!=", "null", ")", "return", "entry", ";...
Adds a name-and-type constant.
[ "Adds", "a", "name", "-", "and", "-", "type", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L478-L495
44,219
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addFieldRef
public FieldRefConstant addFieldRef(String className, String name, String type) { FieldRefConstant entry = getFieldRef(className, name, type); if (entry != null) return entry; ClassConstant classEntry = addClass(className)...
java
public FieldRefConstant addFieldRef(String className, String name, String type) { FieldRefConstant entry = getFieldRef(className, name, type); if (entry != null) return entry; ClassConstant classEntry = addClass(className)...
[ "public", "FieldRefConstant", "addFieldRef", "(", "String", "className", ",", "String", "name", ",", "String", "type", ")", "{", "FieldRefConstant", "entry", "=", "getFieldRef", "(", "className", ",", "name", ",", "type", ")", ";", "if", "(", "entry", "!=", ...
Adds a field ref constant.
[ "Adds", "a", "field", "ref", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L544-L563
44,220
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getMethodHandle
public MethodHandleConstant getMethodHandle(MethodHandleType mhType, ConstantPoolEntry cpEntry) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof MethodHandleConstant)) { continue; ...
java
public MethodHandleConstant getMethodHandle(MethodHandleType mhType, ConstantPoolEntry cpEntry) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry instanceof MethodHandleConstant)) { continue; ...
[ "public", "MethodHandleConstant", "getMethodHandle", "(", "MethodHandleType", "mhType", ",", "ConstantPoolEntry", "cpEntry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ConstantPo...
Gets a method ref constant.
[ "Gets", "a", "method", "ref", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L616-L635
44,221
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.getInterfaceRef
public InterfaceMethodRefConstant getInterfaceRef(String className, String name, String type) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry i...
java
public InterfaceMethodRefConstant getInterfaceRef(String className, String name, String type) { for (int i = 0; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (! (entry i...
[ "public", "InterfaceMethodRefConstant", "getInterfaceRef", "(", "String", "className", ",", "String", "name", ",", "String", "type", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_entries", ".", "size", "(", ")", ";", "i", "++", ")", "{",...
Gets an interface constant.
[ "Gets", "an", "interface", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L659-L679
44,222
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addInterfaceRef
public InterfaceMethodRefConstant addInterfaceRef(String className, String name, String type) { InterfaceMethodRefConstant entry = getInterfaceRef(className, name, type); if (entry != null) return en...
java
public InterfaceMethodRefConstant addInterfaceRef(String className, String name, String type) { InterfaceMethodRefConstant entry = getInterfaceRef(className, name, type); if (entry != null) return en...
[ "public", "InterfaceMethodRefConstant", "addInterfaceRef", "(", "String", "className", ",", "String", "name", ",", "String", "type", ")", "{", "InterfaceMethodRefConstant", "entry", "=", "getInterfaceRef", "(", "className", ",", "name", ",", "type", ")", ";", "if"...
Adds an interface ref constant.
[ "Adds", "an", "interface", "ref", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L684-L703
44,223
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.addInvokeDynamicRef
public InvokeDynamicConstant addInvokeDynamicRef(BootstrapMethodAttribute attr, String methodName, String methodType, String bootClass, ...
java
public InvokeDynamicConstant addInvokeDynamicRef(BootstrapMethodAttribute attr, String methodName, String methodType, String bootClass, ...
[ "public", "InvokeDynamicConstant", "addInvokeDynamicRef", "(", "BootstrapMethodAttribute", "attr", ",", "String", "methodName", ",", "String", "methodType", ",", "String", "bootClass", ",", "String", "bootMethod", ",", "String", "bootType", ",", "ConstantPoolEntry", "["...
Adds an invokedynamic constant.
[ "Adds", "an", "invokedynamic", "constant", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L708-L737
44,224
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java
ConstantPool.write
public void write(ByteCodeWriter out) throws IOException { out.writeShort(_entries.size()); for (int i = 1; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (entry != null) entry.write(out); } }
java
public void write(ByteCodeWriter out) throws IOException { out.writeShort(_entries.size()); for (int i = 1; i < _entries.size(); i++) { ConstantPoolEntry entry = _entries.get(i); if (entry != null) entry.write(out); } }
[ "public", "void", "write", "(", "ByteCodeWriter", "out", ")", "throws", "IOException", "{", "out", ".", "writeShort", "(", "_entries", ".", "size", "(", ")", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "_entries", ".", "size", "(", "...
Writes the contents of the pool.
[ "Writes", "the", "contents", "of", "the", "pool", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/cpool/ConstantPool.java#L742-L753
44,225
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/SpyRandomAccessStream.java
SpyRandomAccessStream.write
public void write(int b) throws IOException { log.info("random-write(0x" + Long.toHexString(getFilePointer()) + ",1)"); _file.write(b); }
java
public void write(int b) throws IOException { log.info("random-write(0x" + Long.toHexString(getFilePointer()) + ",1)"); _file.write(b); }
[ "public", "void", "write", "(", "int", "b", ")", "throws", "IOException", "{", "log", ".", "info", "(", "\"random-write(0x\"", "+", "Long", ".", "toHexString", "(", "getFilePointer", "(", ")", ")", "+", "\",1)\"", ")", ";", "_file", ".", "write", "(", ...
Write a byte to the file, advancing the pointer.
[ "Write", "a", "byte", "to", "the", "file", "advancing", "the", "pointer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/SpyRandomAccessStream.java#L159-L165
44,226
SeaCloudsEU/SeaCloudsPlatform
planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/OptimizerInitialDeployment.java
OptimizerInitialDeployment.createAdHocTopologyFromSuitableOptions
private Topology createAdHocTopologyFromSuitableOptions(SuitableOptions appInfoSuitableOptions) { Topology topology = new Topology(); TopologyElement current = null; TopologyElement previous = null; for (String moduleName : appInfoSuitableOptions.getStringIterator()) { if (current =...
java
private Topology createAdHocTopologyFromSuitableOptions(SuitableOptions appInfoSuitableOptions) { Topology topology = new Topology(); TopologyElement current = null; TopologyElement previous = null; for (String moduleName : appInfoSuitableOptions.getStringIterator()) { if (current =...
[ "private", "Topology", "createAdHocTopologyFromSuitableOptions", "(", "SuitableOptions", "appInfoSuitableOptions", ")", "{", "Topology", "topology", "=", "new", "Topology", "(", ")", ";", "TopologyElement", "current", "=", "null", ";", "TopologyElement", "previous", "="...
Later it will be better an exception than a weird result.
[ "Later", "it", "will", "be", "better", "an", "exception", "than", "a", "weird", "result", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/OptimizerInitialDeployment.java#L439-L464
44,227
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/Crc64Stream.java
Crc64Stream.read
public int read(byte []buffer, int offset, int length) throws IOException { int len = _next.read(buffer, offset, length); _crc = Crc64.generate(_crc, buffer, offset, len); return len; }
java
public int read(byte []buffer, int offset, int length) throws IOException { int len = _next.read(buffer, offset, length); _crc = Crc64.generate(_crc, buffer, offset, len); return len; }
[ "public", "int", "read", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "int", "len", "=", "_next", ".", "read", "(", "buffer", ",", "offset", ",", "length", ")", ";", "_crc", "=", "C...
Reads a buffer from the underlying stream. @param buffer the byte array to read. @param offset the offset into the byte array. @param length the number of bytes to read.
[ "Reads", "a", "buffer", "from", "the", "underlying", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/Crc64Stream.java#L82-L90
44,228
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/files/FileServiceRootImpl.java
FileServiceRootImpl.removeDirectory
public void removeDirectory(String path, String tail, Result<Object> result) { // _dirRemove.exec(result, path, tail); result.ok(null); }
java
public void removeDirectory(String path, String tail, Result<Object> result) { // _dirRemove.exec(result, path, tail); result.ok(null); }
[ "public", "void", "removeDirectory", "(", "String", "path", ",", "String", "tail", ",", "Result", "<", "Object", ">", "result", ")", "{", "// _dirRemove.exec(result, path, tail);", "result", ".", "ok", "(", "null", ")", ";", "}" ]
Updates the directory with the new file list.
[ "Updates", "the", "directory", "with", "the", "new", "file", "list", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/files/FileServiceRootImpl.java#L605-L611
44,229
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/heartbeat/RackHeartbeat.java
RackHeartbeat.updateRack
void updateRack(HeartbeatImpl heartbeat, UpdateRackHeartbeat updateRack) { for (UpdateServerHeartbeat serverUpdate : updateRack.getServers()) { if (serverUpdate == null) { continue; } update(serverUpdate); // updateTargetServers(); ServerHeartbeat peerSe...
java
void updateRack(HeartbeatImpl heartbeat, UpdateRackHeartbeat updateRack) { for (UpdateServerHeartbeat serverUpdate : updateRack.getServers()) { if (serverUpdate == null) { continue; } update(serverUpdate); // updateTargetServers(); ServerHeartbeat peerSe...
[ "void", "updateRack", "(", "HeartbeatImpl", "heartbeat", ",", "UpdateRackHeartbeat", "updateRack", ")", "{", "for", "(", "UpdateServerHeartbeat", "serverUpdate", ":", "updateRack", ".", "getServers", "(", ")", ")", "{", "if", "(", "serverUpdate", "==", "null", "...
Update the rack with a heartbeat message.
[ "Update", "the", "rack", "with", "a", "heartbeat", "message", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/heartbeat/RackHeartbeat.java#L265-L301
44,230
baratine/baratine
core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java
ConfigImpl.get
@Override public String get(String key, String defaultValue) { String value = _map.get(key); if (value != null) { return value; } else { return defaultValue; } }
java
@Override public String get(String key, String defaultValue) { String value = _map.get(key); if (value != null) { return value; } else { return defaultValue; } }
[ "@", "Override", "public", "String", "get", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "_map", ".", "get", "(", "key", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ";", "}", "e...
Configuration value with a default value.
[ "Configuration", "value", "with", "a", "default", "value", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java#L107-L118
44,231
baratine/baratine
core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java
ConfigImpl.get
@SuppressWarnings("unchecked") public <T> T get(String key, Class<T> type, T defaultValue) { Objects.requireNonNull(key); Objects.requireNonNull(type); String value = _map.get(key); if (value == null) { return defaultValue; } if (type.equals(String.class)) { return (T) value; ...
java
@SuppressWarnings("unchecked") public <T> T get(String key, Class<T> type, T defaultValue) { Objects.requireNonNull(key); Objects.requireNonNull(type); String value = _map.get(key); if (value == null) { return defaultValue; } if (type.equals(String.class)) { return (T) value; ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "get", "(", "String", "key", ",", "Class", "<", "T", ">", "type", ",", "T", "defaultValue", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ")", ";", "Objects", ...
Gets a configuration value converted to a type.
[ "Gets", "a", "configuration", "value", "converted", "to", "a", "type", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java#L123-L153
44,232
baratine/baratine
core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java
ConfigImpl.inject
@Override public <T> void inject(T bean, String prefix) { Objects.requireNonNull(bean); ConfigStub stub = new ConfigStub(bean.getClass(), prefix); stub.inject(bean, this); }
java
@Override public <T> void inject(T bean, String prefix) { Objects.requireNonNull(bean); ConfigStub stub = new ConfigStub(bean.getClass(), prefix); stub.inject(bean, this); }
[ "@", "Override", "public", "<", "T", ">", "void", "inject", "(", "T", "bean", ",", "String", "prefix", ")", "{", "Objects", ".", "requireNonNull", "(", "bean", ")", ";", "ConfigStub", "stub", "=", "new", "ConfigStub", "(", "bean", ".", "getClass", "(",...
Inject a bean from the configuration
[ "Inject", "a", "bean", "from", "the", "configuration" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/config/impl/ConfigImpl.java#L195-L203
44,233
baratine/baratine
web/src/main/java/com/caucho/v5/web/webapp/FormBaratine.java
FormBaratine.readChar
private static void readChar(ByteToChar converter, CharReader is, int ch, boolean isTop) throws IOException { if (ch == '+') { if (isTop) converter.addByte(' '); else converter.addChar(' '); } else if (ch == '%'...
java
private static void readChar(ByteToChar converter, CharReader is, int ch, boolean isTop) throws IOException { if (ch == '+') { if (isTop) converter.addByte(' '); else converter.addChar(' '); } else if (ch == '%'...
[ "private", "static", "void", "readChar", "(", "ByteToChar", "converter", ",", "CharReader", "is", ",", "int", "ch", ",", "boolean", "isTop", ")", "throws", "IOException", "{", "if", "(", "ch", "==", "'", "'", ")", "{", "if", "(", "isTop", ")", "convert...
Scans the next character from the input stream, adding it to the converter. @param converter the byte-to-character converter @param is the form's input stream @param ch the next character
[ "Scans", "the", "next", "character", "from", "the", "input", "stream", "adding", "it", "to", "the", "converter", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/webapp/FormBaratine.java#L137-L174
44,234
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/AbstractJavaCompiler.java
AbstractJavaCompiler.run
@Override public void run() { try { runImpl(); } catch (final Throwable e) { // env/0203 vs env/0206 if (e instanceof DisplayableException) log.warning(e.getMessage()); else log.warning(e.toString()); _exception = e; } finally { notifyComplete()...
java
@Override public void run() { try { runImpl(); } catch (final Throwable e) { // env/0203 vs env/0206 if (e instanceof DisplayableException) log.warning(e.getMessage()); else log.warning(e.toString()); _exception = e; } finally { notifyComplete()...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "try", "{", "runImpl", "(", ")", ";", "}", "catch", "(", "final", "Throwable", "e", ")", "{", "// env/0203 vs env/0206", "if", "(", "e", "instanceof", "DisplayableException", ")", "log", ".", "warn...
runs the compiler.
[ "runs", "the", "compiler", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/AbstractJavaCompiler.java#L104-L120
44,235
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/StreamImplOutputStream.java
StreamImplOutputStream.write
@Override public void write(int v) throws IOException { _buf[0] = (byte) v; _stream.write(_buf, 0, 1, false); }
java
@Override public void write(int v) throws IOException { _buf[0] = (byte) v; _stream.write(_buf, 0, 1, false); }
[ "@", "Override", "public", "void", "write", "(", "int", "v", ")", "throws", "IOException", "{", "_buf", "[", "0", "]", "=", "(", "byte", ")", "v", ";", "_stream", ".", "write", "(", "_buf", ",", "0", ",", "1", ",", "false", ")", ";", "}" ]
Writes a byte to the underlying stream. @param v the value to write
[ "Writes", "a", "byte", "to", "the", "underlying", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StreamImplOutputStream.java#L55-L62
44,236
SeaCloudsEU/SeaCloudsPlatform
discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/LocationMapping.java
LocationMapping.getLocation
public static String getLocation(String providerName) { for (String key : map.keySet()) { if (providerName.startsWith(key)) { return map.get(key); } } return null; }
java
public static String getLocation(String providerName) { for (String key : map.keySet()) { if (providerName.startsWith(key)) { return map.get(key); } } return null; }
[ "public", "static", "String", "getLocation", "(", "String", "providerName", ")", "{", "for", "(", "String", "key", ":", "map", ".", "keySet", "(", ")", ")", "{", "if", "(", "providerName", ".", "startsWith", "(", "key", ")", ")", "{", "return", "map", ...
Gets the sanitized location of an offering @param providerName the name of the provider @return the sanitized location string if sanitizable, null otherwise
[ "Gets", "the", "sanitized", "location", "of", "an", "offering" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/discoverer/src/main/java/eu/seaclouds/platform/discoverer/core/LocationMapping.java#L73-L81
44,237
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/attr/SignatureAttribute.java
SignatureAttribute.read
public void read(ByteCodeParser in) throws IOException { int length = in.readInt(); if (length != 2) throw new IOException("expected length of 2 at " + length); int code = in.readShort(); _signature = in.getUTF8(code); }
java
public void read(ByteCodeParser in) throws IOException { int length = in.readInt(); if (length != 2) throw new IOException("expected length of 2 at " + length); int code = in.readShort(); _signature = in.getUTF8(code); }
[ "public", "void", "read", "(", "ByteCodeParser", "in", ")", "throws", "IOException", "{", "int", "length", "=", "in", ".", "readInt", "(", ")", ";", "if", "(", "length", "!=", "2", ")", "throw", "new", "IOException", "(", "\"expected length of 2 at \"", "+...
Reads the signature.
[ "Reads", "the", "signature", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/attr/SignatureAttribute.java#L68-L78
44,238
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/TempCharStream.java
TempCharStream.write
public void write(String s, int offset, int length) throws IOException { while (length > 0) { if (_tail == null) addBuffer(TempCharBuffer.allocate()); else if (_tail._buf.length <= _tail._length) { addBuffer(TempCharBuffer.allocate()); // XXX: see TempStream for backing fi...
java
public void write(String s, int offset, int length) throws IOException { while (length > 0) { if (_tail == null) addBuffer(TempCharBuffer.allocate()); else if (_tail._buf.length <= _tail._length) { addBuffer(TempCharBuffer.allocate()); // XXX: see TempStream for backing fi...
[ "public", "void", "write", "(", "String", "s", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "while", "(", "length", ">", "0", ")", "{", "if", "(", "_tail", "==", "null", ")", "addBuffer", "(", "TempCharBuffer", ".", ...
Writes part of a string.
[ "Writes", "part", "of", "a", "string", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/TempCharStream.java#L147-L169
44,239
baratine/baratine
core/src/main/java/com/caucho/v5/loader/DynamicClassLoader.java
DynamicClassLoader.getInitParent
private static ClassLoader getInitParent(ClassLoader parent, boolean isRoot) { if (parent == null) parent = Thread.currentThread().getContextClassLoader(); if (isRoot || parent instanceof DynamicClassLoader) return parent; else { //return RootD...
java
private static ClassLoader getInitParent(ClassLoader parent, boolean isRoot) { if (parent == null) parent = Thread.currentThread().getContextClassLoader(); if (isRoot || parent instanceof DynamicClassLoader) return parent; else { //return RootD...
[ "private", "static", "ClassLoader", "getInitParent", "(", "ClassLoader", "parent", ",", "boolean", "isRoot", ")", "{", "if", "(", "parent", "==", "null", ")", "parent", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";...
Returns the initialization parent, i.e. the parent if given or the context class loader if not given.
[ "Returns", "the", "initialization", "parent", "i", ".", "e", ".", "the", "parent", "if", "given", "or", "the", "context", "class", "loader", "if", "not", "given", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/DynamicClassLoader.java#L235-L247
44,240
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java
AbstractWriter.write
@Override public void write(int ch) throws IOException { char []buffer = _tempCharBuffer; buffer[0] = (char) ch; write(buffer, 0, 1); }
java
@Override public void write(int ch) throws IOException { char []buffer = _tempCharBuffer; buffer[0] = (char) ch; write(buffer, 0, 1); }
[ "@", "Override", "public", "void", "write", "(", "int", "ch", ")", "throws", "IOException", "{", "char", "[", "]", "buffer", "=", "_tempCharBuffer", ";", "buffer", "[", "0", "]", "=", "(", "char", ")", "ch", ";", "write", "(", "buffer", ",", "0", "...
Writes a character to the output. @param buf the buffer to write.
[ "Writes", "a", "character", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java#L71-L80
44,241
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java
AbstractWriter.write
@Override public void write(String s, int off, int len) throws IOException { char []buffer = _tempCharBuffer; int bufferLength = buffer.length; while (len > 0) { int sublen = Math.min(len, bufferLength); s.getChars(off, off + sublen, buffer, 0); write(buffer, 0, ...
java
@Override public void write(String s, int off, int len) throws IOException { char []buffer = _tempCharBuffer; int bufferLength = buffer.length; while (len > 0) { int sublen = Math.min(len, bufferLength); s.getChars(off, off + sublen, buffer, 0); write(buffer, 0, ...
[ "@", "Override", "public", "void", "write", "(", "String", "s", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "char", "[", "]", "buffer", "=", "_tempCharBuffer", ";", "int", "bufferLength", "=", "buffer", ".", "length", ";", ...
Writes a subsection of a string to the output.
[ "Writes", "a", "subsection", "of", "a", "string", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java#L85-L102
44,242
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java
AbstractWriter.write
@Override final public void write(String s) throws IOException { if (s == null) { write(_nullChars, 0, _nullChars.length); return; } write(s, 0, s.length()); }
java
@Override final public void write(String s) throws IOException { if (s == null) { write(_nullChars, 0, _nullChars.length); return; } write(s, 0, s.length()); }
[ "@", "Override", "final", "public", "void", "write", "(", "String", "s", ")", "throws", "IOException", "{", "if", "(", "s", "==", "null", ")", "{", "write", "(", "_nullChars", ",", "0", ",", "_nullChars", ".", "length", ")", ";", "return", ";", "}", ...
Writes a string to the output.
[ "Writes", "a", "string", "to", "the", "output", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/AbstractWriter.java#L119-L129
44,243
optimaize/anythingworks
client/rest/src/main/java/com/optimaize/anythingworks/client/rest/http/HeaderParams.java
HeaderParams.put
public HeaderParams put(String name, String value) { values.put(cleanAndValidate(name), cleanAndValidate(value)); return this; }
java
public HeaderParams put(String name, String value) { values.put(cleanAndValidate(name), cleanAndValidate(value)); return this; }
[ "public", "HeaderParams", "put", "(", "String", "name", ",", "String", "value", ")", "{", "values", ".", "put", "(", "cleanAndValidate", "(", "name", ")", ",", "cleanAndValidate", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
Overwrites in case there is a value already associated with that name. @return the same instance
[ "Overwrites", "in", "case", "there", "is", "a", "value", "already", "associated", "with", "that", "name", "." ]
23e5f1c63cd56d935afaac4ad033c7996b32a1f2
https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/client/rest/src/main/java/com/optimaize/anythingworks/client/rest/http/HeaderParams.java#L47-L50
44,244
baratine/baratine
framework/src/main/java/com/caucho/v5/profile/Profile.java
Profile.setBackgroundPeriod
public void setBackgroundPeriod(long period) { if (period < 1) { throw new ConfigException(L.l("profile period '{0}ms' is too small. The period must be greater than 10ms.", period)); } _profilerService.setBackgroundInterval(period, TimeUnit.MILLISECONDS); }
java
public void setBackgroundPeriod(long period) { if (period < 1) { throw new ConfigException(L.l("profile period '{0}ms' is too small. The period must be greater than 10ms.", period)); } _profilerService.setBackgroundInterval(period, TimeUnit.MILLISECONDS); }
[ "public", "void", "setBackgroundPeriod", "(", "long", "period", ")", "{", "if", "(", "period", "<", "1", ")", "{", "throw", "new", "ConfigException", "(", "L", ".", "l", "(", "\"profile period '{0}ms' is too small. The period must be greater than 10ms.\"", ",", "pe...
Sets the background interval. If the background profile hasn't started, start it.
[ "Sets", "the", "background", "interval", ".", "If", "the", "background", "profile", "hasn", "t", "started", "start", "it", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/profile/Profile.java#L71-L79
44,245
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.setLocation
public void setLocation(String filename, int line) throws IOException { if (_lineMap != null && filename != null && line >= 0) { _lineMap.add(filename, line, _destLine, _isPreferLast); } }
java
public void setLocation(String filename, int line) throws IOException { if (_lineMap != null && filename != null && line >= 0) { _lineMap.add(filename, line, _destLine, _isPreferLast); } }
[ "public", "void", "setLocation", "(", "String", "filename", ",", "int", "line", ")", "throws", "IOException", "{", "if", "(", "_lineMap", "!=", "null", "&&", "filename", "!=", "null", "&&", "line", ">=", "0", ")", "{", "_lineMap", ".", "add", "(", "fil...
Sets the source filename and line. @param filename the filename of the source file. @param line the line of the source file.
[ "Sets", "the", "source", "filename", "and", "line", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L114-L119
44,246
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if (ch == '\n' && !_lastCr) _de...
java
public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if (ch == '\n' && !_lastCr) _de...
[ "public", "void", "print", "(", "String", "s", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "if", "(", "s", "==", "null", ")", "{", "_lastCr", "=", "false", ";", "_os", ".", "print", "(", "\"null\"", ...
Prints a string
[ "Prints", "a", "string" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L237-L262
44,247
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(char ch) throws IOException { if (_startLine) printIndent(); if (ch == '\r') { _destLine++; } else if (ch == '\n' && !_lastCr) _destLine++; _lastCr = ch == '\r'; _os.print(ch); }
java
public void print(char ch) throws IOException { if (_startLine) printIndent(); if (ch == '\r') { _destLine++; } else if (ch == '\n' && !_lastCr) _destLine++; _lastCr = ch == '\r'; _os.print(ch); }
[ "public", "void", "print", "(", "char", "ch", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "if", "(", "ch", "==", "'", "'", ")", "{", "_destLine", "++", ";", "}", "else", "if", "(", "ch", "==", "'...
Prints a character.
[ "Prints", "a", "character", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L272-L285
44,248
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(boolean b) throws IOException { if (_startLine) printIndent(); _os.print(b); _lastCr = false; }
java
public void print(boolean b) throws IOException { if (_startLine) printIndent(); _os.print(b); _lastCr = false; }
[ "public", "void", "print", "(", "boolean", "b", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "_os", ".", "print", "(", "b", ")", ";", "_lastCr", "=", "false", ";", "}" ]
Prints a boolean.
[ "Prints", "a", "boolean", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L290-L297
44,249
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(long l) throws IOException { if (_startLine) printIndent(); _os.print(l); _lastCr = false; }
java
public void print(long l) throws IOException { if (_startLine) printIndent(); _os.print(l); _lastCr = false; }
[ "public", "void", "print", "(", "long", "l", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "_os", ".", "print", "(", "l", ")", ";", "_lastCr", "=", "false", ";", "}" ]
Prints an long
[ "Prints", "an", "long" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L314-L321
44,250
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(Object o) throws IOException { if (_startLine) printIndent(); _os.print(o); _lastCr = false; }
java
public void print(Object o) throws IOException { if (_startLine) printIndent(); _os.print(o); _lastCr = false; }
[ "public", "void", "print", "(", "Object", "o", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "_os", ".", "print", "(", "o", ")", ";", "_lastCr", "=", "false", ";", "}" ]
Prints an object.
[ "Prints", "an", "object", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L326-L333
44,251
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.println
public void println() throws IOException { _os.println(); if (!_lastCr) _destLine++; _lastCr = false; _startLine = true; }
java
public void println() throws IOException { _os.println(); if (!_lastCr) _destLine++; _lastCr = false; _startLine = true; }
[ "public", "void", "println", "(", ")", "throws", "IOException", "{", "_os", ".", "println", "(", ")", ";", "if", "(", "!", "_lastCr", ")", "_destLine", "++", ";", "_lastCr", "=", "false", ";", "_startLine", "=", "true", ";", "}" ]
Prints a newline
[ "Prints", "a", "newline" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L392-L399
44,252
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.printClass
public void printClass(Class<?> cl) throws IOException { if (! cl.isArray()) print(cl.getName().replace('$', '.')); else { printClass(cl.getComponentType()); print("[]"); } }
java
public void printClass(Class<?> cl) throws IOException { if (! cl.isArray()) print(cl.getName().replace('$', '.')); else { printClass(cl.getComponentType()); print("[]"); } }
[ "public", "void", "printClass", "(", "Class", "<", "?", ">", "cl", ")", "throws", "IOException", "{", "if", "(", "!", "cl", ".", "isArray", "(", ")", ")", "print", "(", "cl", ".", "getName", "(", ")", ".", "replace", "(", "'", "'", ",", "'", "'...
Prints the Java represention of the class
[ "Prints", "the", "Java", "represention", "of", "the", "class" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L404-L412
44,253
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.printType
@SuppressWarnings("unchecked") public void printType(Type type) throws IOException { if (type instanceof Class<?>) { printTypeClass((Class<?>) type); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; printParamet...
java
@SuppressWarnings("unchecked") public void printType(Type type) throws IOException { if (type instanceof Class<?>) { printTypeClass((Class<?>) type); } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; printParamet...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "printType", "(", "Type", "type", ")", "throws", "IOException", "{", "if", "(", "type", "instanceof", "Class", "<", "?", ">", ")", "{", "printTypeClass", "(", "(", "Class", "<", "?", "...
Prints the Java representation of the type
[ "Prints", "the", "Java", "representation", "of", "the", "type" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L417-L449
44,254
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.printIndent
public void printIndent() throws IOException { _startLine = false; for (int i = 0; i < _indentDepth; i++) _os.print(' '); _lastCr = false; }
java
public void printIndent() throws IOException { _startLine = false; for (int i = 0; i < _indentDepth; i++) _os.print(' '); _lastCr = false; }
[ "public", "void", "printIndent", "(", ")", "throws", "IOException", "{", "_startLine", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_indentDepth", ";", "i", "++", ")", "_os", ".", "print", "(", "'", "'", ")", ";", "_lastCr",...
Prints the indentation at the beginning of a line.
[ "Prints", "the", "indentation", "at", "the", "beginning", "of", "a", "line", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L706-L714
44,255
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java
QosModels.getActionParameter
public static Parameter getActionParameter(Action action, String paramName) { for (Parameter param : action.getParameters()) { if (paramName.equals(param.getName())) { return param; } } return NOT_FOUND_PARAMETER; }
java
public static Parameter getActionParameter(Action action, String paramName) { for (Parameter param : action.getParameters()) { if (paramName.equals(param.getName())) { return param; } } return NOT_FOUND_PARAMETER; }
[ "public", "static", "Parameter", "getActionParameter", "(", "Action", "action", ",", "String", "paramName", ")", "{", "for", "(", "Parameter", "param", ":", "action", ".", "getParameters", "(", ")", ")", "{", "if", "(", "paramName", ".", "equals", "(", "pa...
Returns the first parameter with attribute "name" equals to paramName; if not found, NOT_FOUND_PARAMETER.
[ "Returns", "the", "first", "parameter", "with", "attribute", "name", "equals", "to", "paramName", ";", "if", "not", "found", "NOT_FOUND_PARAMETER", "." ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java#L71-L78
44,256
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java
QosModels.getActions
public static List<Action> getActions(MonitoringRule rule, String nameFilter) { List<Action> result = new ArrayList<Action>(); if (nameFilter == null) { throw new NullPointerException("nameFilter cannot be null"); } for (Action action : getActions(rule)) { if (na...
java
public static List<Action> getActions(MonitoringRule rule, String nameFilter) { List<Action> result = new ArrayList<Action>(); if (nameFilter == null) { throw new NullPointerException("nameFilter cannot be null"); } for (Action action : getActions(rule)) { if (na...
[ "public", "static", "List", "<", "Action", ">", "getActions", "(", "MonitoringRule", "rule", ",", "String", "nameFilter", ")", "{", "List", "<", "Action", ">", "result", "=", "new", "ArrayList", "<", "Action", ">", "(", ")", ";", "if", "(", "nameFilter",...
Get the actions of a rule filtered by its name
[ "Get", "the", "actions", "of", "a", "rule", "filtered", "by", "its", "name" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java#L83-L95
44,257
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java
QosModels.getActions
public static List<Action> getActions(MonitoringRule rule) { List<Action> result; if (rule.getActions() != null && rule.getActions().getActions() != null) { result = rule.getActions().getActions(); } else { result = Collections.<Action> emptyList(); } ret...
java
public static List<Action> getActions(MonitoringRule rule) { List<Action> result; if (rule.getActions() != null && rule.getActions().getActions() != null) { result = rule.getActions().getActions(); } else { result = Collections.<Action> emptyList(); } ret...
[ "public", "static", "List", "<", "Action", ">", "getActions", "(", "MonitoringRule", "rule", ")", "{", "List", "<", "Action", ">", "result", ";", "if", "(", "rule", ".", "getActions", "(", ")", "!=", "null", "&&", "rule", ".", "getActions", "(", ")", ...
Wrapper to avoid a NPE
[ "Wrapper", "to", "avoid", "a", "NPE" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-personalization/src/main/java/eu/atos/sla/modaclouds/QosModels.java#L100-L109
44,258
baratine/baratine
framework/src/main/java/com/caucho/v5/util/JmxUtil.java
JmxUtil.getObjectName
public static ObjectName getObjectName(String domain, Map<String,String> properties) throws MalformedObjectNameException { StringBuilder cb = new StringBuilder(); cb.append(domain); cb.append(':'); boolean isFirst = true; Pattern escapePattern = Patte...
java
public static ObjectName getObjectName(String domain, Map<String,String> properties) throws MalformedObjectNameException { StringBuilder cb = new StringBuilder(); cb.append(domain); cb.append(':'); boolean isFirst = true; Pattern escapePattern = Patte...
[ "public", "static", "ObjectName", "getObjectName", "(", "String", "domain", ",", "Map", "<", "String", ",", "String", ">", "properties", ")", "throws", "MalformedObjectNameException", "{", "StringBuilder", "cb", "=", "new", "StringBuilder", "(", ")", ";", "cb", ...
Creates the clean name
[ "Creates", "the", "clean", "name" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/util/JmxUtil.java#L52-L104
44,259
baratine/baratine
core/src/main/java/com/caucho/v5/amp/stub/StubClass.java
StubClass.isMethodApi
private boolean isMethodApi(Method method) { if (_type == _api) { return true; } for (Method methodApi : _api.getMethods()) { if (methodApi.getName().equals(method.getName())) { return true; } } return false; }
java
private boolean isMethodApi(Method method) { if (_type == _api) { return true; } for (Method methodApi : _api.getMethods()) { if (methodApi.getName().equals(method.getName())) { return true; } } return false; }
[ "private", "boolean", "isMethodApi", "(", "Method", "method", ")", "{", "if", "(", "_type", "==", "_api", ")", "{", "return", "true", ";", "}", "for", "(", "Method", "methodApi", ":", "_api", ".", "getMethods", "(", ")", ")", "{", "if", "(", "methodA...
Only API methods are exposed.
[ "Only", "API", "methods", "are", "exposed", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/stub/StubClass.java#L385-L398
44,260
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttpWeb.java
RequestHttpWeb.service
@Override public StateConnection service() { try { StateConnection nextState = _state.service(this); //return StateConnection.CLOSE; return nextState; /* if (_invocation == null && getRequestHttp().parseInvocation()) { if (_invocation == null) { return Nex...
java
@Override public StateConnection service() { try { StateConnection nextState = _state.service(this); //return StateConnection.CLOSE; return nextState; /* if (_invocation == null && getRequestHttp().parseInvocation()) { if (_invocation == null) { return Nex...
[ "@", "Override", "public", "StateConnection", "service", "(", ")", "{", "try", "{", "StateConnection", "nextState", "=", "_state", ".", "service", "(", "this", ")", ";", "//return StateConnection.CLOSE;", "return", "nextState", ";", "/*\n if (_invocation == null ...
Service is the main call when data is available from the socket.
[ "Service", "is", "the", "main", "call", "when", "data", "is", "available", "from", "the", "socket", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttpWeb.java#L132-L168
44,261
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.exec
@Override public void exec(String sql, Result<Object> result, Object ...args) { _kraken.query(sql).exec(result, args); }
java
@Override public void exec(String sql, Result<Object> result, Object ...args) { _kraken.query(sql).exec(result, args); }
[ "@", "Override", "public", "void", "exec", "(", "String", "sql", ",", "Result", "<", "Object", ">", "result", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "query", "(", "sql", ")", ".", "exec", "(", "result", ",", "args", ")", ";", "}" ]
Executes a command against the database. @param sql the query to be executed @param result the result of the command @param args parameters for the query
[ "Executes", "a", "command", "against", "the", "database", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L92-L96
44,262
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.prepare
@Override public void prepare(String sql, Result<CursorPrepareSync> result) { result.ok(_kraken.query(sql).prepare()); }
java
@Override public void prepare(String sql, Result<CursorPrepareSync> result) { result.ok(_kraken.query(sql).prepare()); }
[ "@", "Override", "public", "void", "prepare", "(", "String", "sql", ",", "Result", "<", "CursorPrepareSync", ">", "result", ")", "{", "result", ".", "ok", "(", "_kraken", ".", "query", "(", "sql", ")", ".", "prepare", "(", ")", ")", ";", "}" ]
Prepares for later execution of a command. @param sql the query to be executed @param result the prepare cursor.
[ "Prepares", "for", "later", "execution", "of", "a", "command", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L104-L108
44,263
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.findOne
@Override public void findOne(String sql, Result<Cursor> result, Object ...args) { _kraken.query(sql).findOne(result, args); }
java
@Override public void findOne(String sql, Result<Cursor> result, Object ...args) { _kraken.query(sql).findOne(result, args); }
[ "@", "Override", "public", "void", "findOne", "(", "String", "sql", ",", "Result", "<", "Cursor", ">", "result", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "query", "(", "sql", ")", ".", "findOne", "(", "result", ",", "args", ")", ";", ...
Queries for a single result in the database. @param sql the select query @param result holder for the result @param args arguments to the select
[ "Queries", "for", "a", "single", "result", "in", "the", "database", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L118-L122
44,264
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.find
public void find(ResultStream<Cursor> result, String sql, Object ...args) { _kraken.findStream(sql, args, result); }
java
public void find(ResultStream<Cursor> result, String sql, Object ...args) { _kraken.findStream(sql, args, result); }
[ "public", "void", "find", "(", "ResultStream", "<", "Cursor", ">", "result", ",", "String", "sql", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "findStream", "(", "sql", ",", "args", ",", "result", ")", ";", "}" ]
Queries the database, returning values to a result sink. @param sql the select query for the search @param result callback for the result iterator @param args arguments to the sql
[ "Queries", "the", "database", "returning", "values", "to", "a", "result", "sink", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L157-L160
44,265
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java
DatabaseServiceRamp.map
@Override public void map(MethodRef method, String sql, Object ...args) { _kraken.map(method, sql, args); }
java
@Override public void map(MethodRef method, String sql, Object ...args) { _kraken.map(method, sql, args); }
[ "@", "Override", "public", "void", "map", "(", "MethodRef", "method", ",", "String", "sql", ",", "Object", "...", "args", ")", "{", "_kraken", ".", "map", "(", "method", ",", "sql", ",", "args", ")", ";", "}" ]
Starts a map call on the local node. @param sql the select query for the search @param result callback for the result iterator @param args arguments to the sql
[ "Starts", "a", "map", "call", "on", "the", "local", "node", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java#L193-L199
44,266
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java
XmlWriter.writeAttribute
public void writeAttribute(String name, Object value) { if (!_isElementOpen) throw new IllegalStateException("no open element"); if (value == null) return; _isElementOpen = false; try { _strategy.writeAttribute(this, name, value); } finally { _isElementOpen = true; ...
java
public void writeAttribute(String name, Object value) { if (!_isElementOpen) throw new IllegalStateException("no open element"); if (value == null) return; _isElementOpen = false; try { _strategy.writeAttribute(this, name, value); } finally { _isElementOpen = true; ...
[ "public", "void", "writeAttribute", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "!", "_isElementOpen", ")", "throw", "new", "IllegalStateException", "(", "\"no open element\"", ")", ";", "if", "(", "value", "==", "null", ")", "return"...
Write an attribute with a value, if value is null nothing is written. @throws IllegalStateException if the is no element is open
[ "Write", "an", "attribute", "with", "a", "value", "if", "value", "is", "null", "nothing", "is", "written", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java#L291-L307
44,267
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java
XmlWriter.writeAttribute
public void writeAttribute(String name, Object ... values) { if (!_isElementOpen) throw new IllegalStateException("no open element"); _isElementOpen = false; try { _strategy.writeAttribute(this, name, values); } finally { _isElementOpen = true; } }
java
public void writeAttribute(String name, Object ... values) { if (!_isElementOpen) throw new IllegalStateException("no open element"); _isElementOpen = false; try { _strategy.writeAttribute(this, name, values); } finally { _isElementOpen = true; } }
[ "public", "void", "writeAttribute", "(", "String", "name", ",", "Object", "...", "values", ")", "{", "if", "(", "!", "_isElementOpen", ")", "throw", "new", "IllegalStateException", "(", "\"no open element\"", ")", ";", "_isElementOpen", "=", "false", ";", "try...
Write an attribute with multiple values, separated by space, if a value is null nothing is written. @throws IllegalStateException if the is no element is open
[ "Write", "an", "attribute", "with", "multiple", "values", "separated", "by", "space", "if", "a", "value", "is", "null", "nothing", "is", "written", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java#L315-L329
44,268
Dissem/Jabit
core/src/main/java/ch/dissem/bitmessage/InternalContext.java
InternalContext.requestPubkey
public void requestPubkey(final BitmessageAddress contact) { BitmessageAddress stored = addressRepository.getAddress(contact.getAddress()); tryToFindMatchingPubkey(contact); if (contact.getPubkey() != null) { if (stored != null) { stored.setPubkey(contact.getPubkey()...
java
public void requestPubkey(final BitmessageAddress contact) { BitmessageAddress stored = addressRepository.getAddress(contact.getAddress()); tryToFindMatchingPubkey(contact); if (contact.getPubkey() != null) { if (stored != null) { stored.setPubkey(contact.getPubkey()...
[ "public", "void", "requestPubkey", "(", "final", "BitmessageAddress", "contact", ")", "{", "BitmessageAddress", "stored", "=", "addressRepository", ".", "getAddress", "(", "contact", ".", "getAddress", "(", ")", ")", ";", "tryToFindMatchingPubkey", "(", "contact", ...
Be aware that if the pubkey already exists in the inventory, the metods will not request it and the callback for freshly received pubkeys will not be called. Instead the pubkey is added to the contact and stored on DB.
[ "Be", "aware", "that", "if", "the", "pubkey", "already", "exists", "in", "the", "inventory", "the", "metods", "will", "not", "request", "it", "and", "the", "callback", "for", "freshly", "received", "pubkeys", "will", "not", "be", "called", ".", "Instead", ...
64ee41aee81c537aa27818e93e6afcd2ca1b7844
https://github.com/Dissem/Jabit/blob/64ee41aee81c537aa27818e93e6afcd2ca1b7844/core/src/main/java/ch/dissem/bitmessage/InternalContext.java#L228-L254
44,269
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java
WatchServiceImpl.addForeignWatch
public void addForeignWatch(TableKraken table, byte []key, String serverId) { WatchForeign watch = new WatchForeign(key, table, serverId); WatchTable watchTable = getWatchTable(table); watchTable.addWatchForeign(watch, key); }
java
public void addForeignWatch(TableKraken table, byte []key, String serverId) { WatchForeign watch = new WatchForeign(key, table, serverId); WatchTable watchTable = getWatchTable(table); watchTable.addWatchForeign(watch, key); }
[ "public", "void", "addForeignWatch", "(", "TableKraken", "table", ",", "byte", "[", "]", "key", ",", "String", "serverId", ")", "{", "WatchForeign", "watch", "=", "new", "WatchForeign", "(", "key", ",", "table", ",", "serverId", ")", ";", "WatchTable", "wa...
Adds a watch from a foreign server. Remote notifications will send a copy to the foreign server.
[ "Adds", "a", "watch", "from", "a", "foreign", "server", ".", "Remote", "notifications", "will", "send", "a", "copy", "to", "the", "foreign", "server", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java#L197-L204
44,270
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java
WatchServiceImpl.notifyWatch
@Override public void notifyWatch(TableKraken table, byte []key) { WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { watchTable.onPut(key, TableListener.TypePut.REMOTE); } }
java
@Override public void notifyWatch(TableKraken table, byte []key) { WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { watchTable.onPut(key, TableListener.TypePut.REMOTE); } }
[ "@", "Override", "public", "void", "notifyWatch", "(", "TableKraken", "table", ",", "byte", "[", "]", "key", ")", "{", "WatchTable", "watchTable", "=", "_tableMap", ".", "get", "(", "table", ")", ";", "if", "(", "watchTable", "!=", "null", ")", "{", "w...
Notify local and remote watches for the given table and key @param table the table with the updated row @param key the key for the updated row
[ "Notify", "local", "and", "remote", "watches", "for", "the", "given", "table", "and", "key" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java#L212-L220
44,271
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java
WatchServiceImpl.notifyLocalWatch
public void notifyLocalWatch(TableKraken table, byte []key) { WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { watchTable.onPut(key, TableListener.TypePut.LOCAL); } }
java
public void notifyLocalWatch(TableKraken table, byte []key) { WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { watchTable.onPut(key, TableListener.TypePut.LOCAL); } }
[ "public", "void", "notifyLocalWatch", "(", "TableKraken", "table", ",", "byte", "[", "]", "key", ")", "{", "WatchTable", "watchTable", "=", "_tableMap", ".", "get", "(", "table", ")", ";", "if", "(", "watchTable", "!=", "null", ")", "{", "watchTable", "....
Notify local watches for the given table and key @param table the table with the updated row @param key the key for the updated row
[ "Notify", "local", "watches", "for", "the", "given", "table", "and", "key" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java#L228-L235
44,272
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/KelpManager.java
KelpManager.addTable
public void addTable(TableKelp tableKelp, String sql, BackupKelp backupCb) { // TableKelp tableKelp = tableKraken.getTableKelp(); RowCursor cursor = _metaTable.cursor(); cursor.setBytes(1, tableKelp.tableKey(), 0); cursor.setString(2, tableKelp.ge...
java
public void addTable(TableKelp tableKelp, String sql, BackupKelp backupCb) { // TableKelp tableKelp = tableKraken.getTableKelp(); RowCursor cursor = _metaTable.cursor(); cursor.setBytes(1, tableKelp.tableKey(), 0); cursor.setString(2, tableKelp.ge...
[ "public", "void", "addTable", "(", "TableKelp", "tableKelp", ",", "String", "sql", ",", "BackupKelp", "backupCb", ")", "{", "// TableKelp tableKelp = tableKraken.getTableKelp();", "RowCursor", "cursor", "=", "_metaTable", ".", "cursor", "(", ")", ";", "cursor", ".",...
Table callbacks. @param result
[ "Table", "callbacks", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/KelpManager.java#L262-L285
44,273
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java
FileRandomAccessStream.write
public void write(byte []buffer, int offset, int length) throws IOException { _file.write(buffer, offset, length); }
java
public void write(byte []buffer, int offset, int length) throws IOException { _file.write(buffer, offset, length); }
[ "public", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "_file", ".", "write", "(", "buffer", ",", "offset", ",", "length", ")", ";", "}" ]
Writes a block starting from the current file pointer.
[ "Writes", "a", "block", "starting", "from", "the", "current", "file", "pointer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java#L122-L126
44,274
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java
FileRandomAccessStream.write
public void write(long fileOffset, byte []buffer, int offset, int length) throws IOException { _file.seek(fileOffset); _file.write(buffer, offset, length); }
java
public void write(long fileOffset, byte []buffer, int offset, int length) throws IOException { _file.seek(fileOffset); _file.write(buffer, offset, length); }
[ "public", "void", "write", "(", "long", "fileOffset", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "_file", ".", "seek", "(", "fileOffset", ")", ";", "_file", ".", "write", "(", "buffer...
Writes a block from a given location.
[ "Writes", "a", "block", "from", "a", "given", "location", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java#L131-L137
44,275
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java
FileRandomAccessStream.getOutputStream
public OutputStream getOutputStream() throws IOException { if (_os == null) _os = new FileOutputStream(_file.getFD()); return _os; }
java
public OutputStream getOutputStream() throws IOException { if (_os == null) _os = new FileOutputStream(_file.getFD()); return _os; }
[ "public", "OutputStream", "getOutputStream", "(", ")", "throws", "IOException", "{", "if", "(", "_os", "==", "null", ")", "_os", "=", "new", "FileOutputStream", "(", "_file", ".", "getFD", "(", ")", ")", ";", "return", "_os", ";", "}" ]
Returns an OutputStream for this stream.
[ "Returns", "an", "OutputStream", "for", "this", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java#L156-L163
44,276
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java
FileRandomAccessStream.getInputStream
public InputStream getInputStream() throws IOException { if (_is == null) _is = new FileInputStream(_file.getFD()); return _is; }
java
public InputStream getInputStream() throws IOException { if (_is == null) _is = new FileInputStream(_file.getFD()); return _is; }
[ "public", "InputStream", "getInputStream", "(", ")", "throws", "IOException", "{", "if", "(", "_is", "==", "null", ")", "_is", "=", "new", "FileInputStream", "(", "_file", ".", "getFD", "(", ")", ")", ";", "return", "_is", ";", "}" ]
Returns an InputStream for this stream.
[ "Returns", "an", "InputStream", "for", "this", "stream", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/FileRandomAccessStream.java#L168-L175
44,277
baratine/baratine
framework/src/main/java/com/caucho/v5/util/HTTPUtil.java
HTTPUtil.encodeString
public static String encodeString(String uri) { CharBuffer cb = CharBuffer.allocate(); for (int i = 0; i < uri.length(); i++) { char ch = uri.charAt(i); switch (ch) { case '<': cb.append("&lt;"); break; case '>': cb.append("&gt;"); break; case '&...
java
public static String encodeString(String uri) { CharBuffer cb = CharBuffer.allocate(); for (int i = 0; i < uri.length(); i++) { char ch = uri.charAt(i); switch (ch) { case '<': cb.append("&lt;"); break; case '>': cb.append("&gt;"); break; case '&...
[ "public", "static", "String", "encodeString", "(", "String", "uri", ")", "{", "CharBuffer", "cb", "=", "CharBuffer", ".", "allocate", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "uri", ".", "length", "(", ")", ";", "i", "++", ...
Escape special characters.
[ "Escape", "special", "characters", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/util/HTTPUtil.java#L38-L61
44,278
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.getLatencyFactor
public double getLatencyFactor() { long now = CurrentTime.currentTime(); long decayPeriod = 60000; long delta = decayPeriod - (now - _lastSuccessTime); // decay the latency factor over 60s if (delta <= 0) return 0; else return (_latencyFactor * delta) / decayPeriod; }
java
public double getLatencyFactor() { long now = CurrentTime.currentTime(); long decayPeriod = 60000; long delta = decayPeriod - (now - _lastSuccessTime); // decay the latency factor over 60s if (delta <= 0) return 0; else return (_latencyFactor * delta) / decayPeriod; }
[ "public", "double", "getLatencyFactor", "(", ")", "{", "long", "now", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "long", "decayPeriod", "=", "60000", ";", "long", "delta", "=", "decayPeriod", "-", "(", "now", "-", "_lastSuccessTime", ")", ";", ...
Returns the latency factory
[ "Returns", "the", "latency", "factory" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L494-L508
44,279
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.getCpuLoadAvg
public double getCpuLoadAvg() { double avg = _cpuLoadAvg; long time = _cpuSetTime; long now = CurrentTime.currentTime(); if (now - time < 10000L) return avg; else return avg * 10000L / (now - time); }
java
public double getCpuLoadAvg() { double avg = _cpuLoadAvg; long time = _cpuSetTime; long now = CurrentTime.currentTime(); if (now - time < 10000L) return avg; else return avg * 10000L / (now - time); }
[ "public", "double", "getCpuLoadAvg", "(", ")", "{", "double", "avg", "=", "_cpuLoadAvg", ";", "long", "time", "=", "_cpuSetTime", ";", "long", "now", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "if", "(", "now", "-", "time", "<", "10000L", "...
Gets the CPU load avg
[ "Gets", "the", "CPU", "load", "avg" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L538-L549
44,280
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.success
@Override public void success() { _currentFailCount = 0; long now = CurrentTime.currentTime(); if (_firstSuccessTime <= 0) { _firstSuccessTime = now; } // reset the connection fail recover time _dynamicFailRecoverTime = 1000L; }
java
@Override public void success() { _currentFailCount = 0; long now = CurrentTime.currentTime(); if (_firstSuccessTime <= 0) { _firstSuccessTime = now; } // reset the connection fail recover time _dynamicFailRecoverTime = 1000L; }
[ "@", "Override", "public", "void", "success", "(", ")", "{", "_currentFailCount", "=", "0", ";", "long", "now", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "if", "(", "_firstSuccessTime", "<=", "0", ")", "{", "_firstSuccessTime", "=", "now", "...
Called when the server has a successful response
[ "Called", "when", "the", "server", "has", "a", "successful", "response" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L869-L882
44,281
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.openWarm
@Override public ClientSocket openWarm() { State state = _state; if (! state.isEnabled()) { return null; } /* long now = CurrentTime.getCurrentTime(); if (isFailed(now)) { return null; } */ ClientSocket stream = openRecycle(); if (stream != null) { ...
java
@Override public ClientSocket openWarm() { State state = _state; if (! state.isEnabled()) { return null; } /* long now = CurrentTime.getCurrentTime(); if (isFailed(now)) { return null; } */ ClientSocket stream = openRecycle(); if (stream != null) { ...
[ "@", "Override", "public", "ClientSocket", "openWarm", "(", ")", "{", "State", "state", "=", "_state", ";", "if", "(", "!", "state", ".", "isEnabled", "(", ")", ")", "{", "return", "null", ";", "}", "/*\n long now = CurrentTime.getCurrentTime();\n \n if...
Open a stream to the target server, restricted by warmup. @return the socket's read/write pair.
[ "Open", "a", "stream", "to", "the", "target", "server", "restricted", "by", "warmup", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L928-L957
44,282
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.openIfLive
@Override public ClientSocket openIfLive() { if (_state.isClosed()) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; long now = CurrentTime.currentTime(); if (isFailed(now)) return null; else if (_state == State.FAIL && _start...
java
@Override public ClientSocket openIfLive() { if (_state.isClosed()) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; long now = CurrentTime.currentTime(); if (isFailed(now)) return null; else if (_state == State.FAIL && _start...
[ "@", "Override", "public", "ClientSocket", "openIfLive", "(", ")", "{", "if", "(", "_state", ".", "isClosed", "(", ")", ")", "{", "return", "null", ";", "}", "ClientSocket", "stream", "=", "openRecycle", "(", ")", ";", "if", "(", "stream", "!=", "null"...
Open a stream to the target server object persistence. @return the socket's read/write pair.
[ "Open", "a", "stream", "to", "the", "target", "server", "object", "persistence", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L964-L986
44,283
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.openIfHeartbeatActive
public ClientSocket openIfHeartbeatActive() { if (_state.isClosed()) { return null; } if (! _isHeartbeatActive && _isHeartbeatServer) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; return connect(); }
java
public ClientSocket openIfHeartbeatActive() { if (_state.isClosed()) { return null; } if (! _isHeartbeatActive && _isHeartbeatServer) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; return connect(); }
[ "public", "ClientSocket", "openIfHeartbeatActive", "(", ")", "{", "if", "(", "_state", ".", "isClosed", "(", ")", ")", "{", "return", "null", ";", "}", "if", "(", "!", "_isHeartbeatActive", "&&", "_isHeartbeatServer", ")", "{", "return", "null", ";", "}", ...
Open a stream if the target server's heartbeat is active. @return the socket's read/write pair.
[ "Open", "a", "stream", "if", "the", "target", "server", "s", "heartbeat", "is", "active", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L993-L1009
44,284
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.openSticky
public ClientSocket openSticky() { State state = _state; if (! state.isSessionEnabled()) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; long now = CurrentTime.currentTime(); if (isFailed(now)) { return null; } if (isB...
java
public ClientSocket openSticky() { State state = _state; if (! state.isSessionEnabled()) { return null; } ClientSocket stream = openRecycle(); if (stream != null) return stream; long now = CurrentTime.currentTime(); if (isFailed(now)) { return null; } if (isB...
[ "public", "ClientSocket", "openSticky", "(", ")", "{", "State", "state", "=", "_state", ";", "if", "(", "!", "state", ".", "isSessionEnabled", "(", ")", ")", "{", "return", "null", ";", "}", "ClientSocket", "stream", "=", "openRecycle", "(", ")", ";", ...
Open a stream to the target server for a session. @return the socket's read/write pair.
[ "Open", "a", "stream", "to", "the", "target", "server", "for", "a", "session", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L1016-L1039
44,285
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.open
@Override public ClientSocket open() { State state = _state; if (! state.isInit()) return null; ClientSocket stream = openRecycle(); if (stream != null) return stream; return connect(); }
java
@Override public ClientSocket open() { State state = _state; if (! state.isInit()) return null; ClientSocket stream = openRecycle(); if (stream != null) return stream; return connect(); }
[ "@", "Override", "public", "ClientSocket", "open", "(", ")", "{", "State", "state", "=", "_state", ";", "if", "(", "!", "state", ".", "isInit", "(", ")", ")", "return", "null", ";", "ClientSocket", "stream", "=", "openRecycle", "(", ")", ";", "if", "...
Open a stream to the target server for the load balancer. @return the socket's read/write pair.
[ "Open", "a", "stream", "to", "the", "target", "server", "for", "the", "load", "balancer", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L1046-L1060
44,286
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.openRecycle
private ClientSocket openRecycle() { long now = CurrentTime.currentTime(); ClientSocket stream = null; synchronized (this) { if (_idleHead != _idleTail) { stream = _idle[_idleHead]; long freeTime = stream.getIdleStartTime(); _idle[_idleHead] = null; _idleHead = (_id...
java
private ClientSocket openRecycle() { long now = CurrentTime.currentTime(); ClientSocket stream = null; synchronized (this) { if (_idleHead != _idleTail) { stream = _idle[_idleHead]; long freeTime = stream.getIdleStartTime(); _idle[_idleHead] = null; _idleHead = (_id...
[ "private", "ClientSocket", "openRecycle", "(", ")", "{", "long", "now", "=", "CurrentTime", ".", "currentTime", "(", ")", ";", "ClientSocket", "stream", "=", "null", ";", "synchronized", "(", "this", ")", "{", "if", "(", "_idleHead", "!=", "_idleTail", ")"...
Returns a valid recycled stream from the idle pool to the backend. If the stream has been in the pool for too long (> live_time), close it instead. @return the socket's read/write pair.
[ "Returns", "a", "valid", "recycled", "stream", "from", "the", "idle", "pool", "to", "the", "backend", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L1070-L1106
44,287
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.connect
private ClientSocket connect() { if (_maxConnections <= _activeCount.get() + _startingCount.get()) { if (log.isLoggable(Level.WARNING)) { log.warning(this + " connect exceeded max-connections" + "\n max-connections=" + _maxConnections + "\n activeCount=" + _...
java
private ClientSocket connect() { if (_maxConnections <= _activeCount.get() + _startingCount.get()) { if (log.isLoggable(Level.WARNING)) { log.warning(this + " connect exceeded max-connections" + "\n max-connections=" + _maxConnections + "\n activeCount=" + _...
[ "private", "ClientSocket", "connect", "(", ")", "{", "if", "(", "_maxConnections", "<=", "_activeCount", ".", "get", "(", ")", "+", "_startingCount", ".", "get", "(", ")", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "WARNING", ")"...
Connect to the backend server. @return the socket's read/write pair.
[ "Connect", "to", "the", "backend", "server", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L1113-L1190
44,288
baratine/baratine
framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java
ClientSocketFactory.canConnect
public boolean canConnect() { try { wake(); ClientSocket stream = open(); if (stream != null) { stream.free(stream.getIdleStartTime()); return true; } return false; } catch (Exception e) { log.log(Level.FINER, e.toString(), e); return false; }...
java
public boolean canConnect() { try { wake(); ClientSocket stream = open(); if (stream != null) { stream.free(stream.getIdleStartTime()); return true; } return false; } catch (Exception e) { log.log(Level.FINER, e.toString(), e); return false; }...
[ "public", "boolean", "canConnect", "(", ")", "{", "try", "{", "wake", "(", ")", ";", "ClientSocket", "stream", "=", "open", "(", ")", ";", "if", "(", "stream", "!=", "null", ")", "{", "stream", ".", "free", "(", "stream", ".", "getIdleStartTime", "("...
Returns true if can connect to the client.
[ "Returns", "true", "if", "can", "connect", "to", "the", "client", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/network/balance/ClientSocketFactory.java#L1425-L1444
44,289
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.write
@Override public void write(byte []buffer, int offset, int length) { write(buffer, offset, length, true); }
java
@Override public void write(byte []buffer, int offset, int length) { write(buffer, offset, length, true); }
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "write", "(", "buffer", ",", "offset", ",", "length", ",", "true", ")", ";", "}" ]
Write a final binary chunk.
[ "Write", "a", "final", "binary", "chunk", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L179-L183
44,290
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.writePart
@Override public void writePart(byte []buffer, int offset, int length) { write(buffer, offset, length, false); }
java
@Override public void writePart(byte []buffer, int offset, int length) { write(buffer, offset, length, false); }
[ "@", "Override", "public", "void", "writePart", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "write", "(", "buffer", ",", "offset", ",", "length", ",", "false", ")", ";", "}" ]
Write a non-final binary chunk.
[ "Write", "a", "non", "-", "final", "binary", "chunk", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L188-L192
44,291
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.write
private void write(byte []buffer, int offset, int length, boolean isFinal) { Objects.requireNonNull(buffer); _frameOut.write(buffer, offset, length, isFinal); }
java
private void write(byte []buffer, int offset, int length, boolean isFinal) { Objects.requireNonNull(buffer); _frameOut.write(buffer, offset, length, isFinal); }
[ "private", "void", "write", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ",", "boolean", "isFinal", ")", "{", "Objects", ".", "requireNonNull", "(", "buffer", ")", ";", "_frameOut", ".", "write", "(", "buffer", ",", "off...
Write a binary chunk.
[ "Write", "a", "binary", "chunk", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L197-L202
44,292
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.close
@Override public void close(WebSocketClose reason, String text) { Objects.requireNonNull(reason); if (_state.isClosed()) { return; } _state = _state.closeSelf(); _frameOut.close(reason, text); if (_state.isClosed()) { disconnect(); } }
java
@Override public void close(WebSocketClose reason, String text) { Objects.requireNonNull(reason); if (_state.isClosed()) { return; } _state = _state.closeSelf(); _frameOut.close(reason, text); if (_state.isClosed()) { disconnect(); } }
[ "@", "Override", "public", "void", "close", "(", "WebSocketClose", "reason", ",", "String", "text", ")", "{", "Objects", ".", "requireNonNull", "(", "reason", ")", ";", "if", "(", "_state", ".", "isClosed", "(", ")", ")", "{", "return", ";", "}", "_sta...
Close the websocket.
[ "Close", "the", "websocket", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L233-L249
44,293
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.readClose
private void readClose(FrameIn fIs) throws IOException { if (_state.isClosed()) { return; } _state = _state.closePeer(); int code = fIs.readClose(); StringBuilder sb = new StringBuilder(); fIs.readText(sb); if (_service != null) { WebSocketClose codeWs = WebSocketCloses...
java
private void readClose(FrameIn fIs) throws IOException { if (_state.isClosed()) { return; } _state = _state.closePeer(); int code = fIs.readClose(); StringBuilder sb = new StringBuilder(); fIs.readText(sb); if (_service != null) { WebSocketClose codeWs = WebSocketCloses...
[ "private", "void", "readClose", "(", "FrameIn", "fIs", ")", "throws", "IOException", "{", "if", "(", "_state", ".", "isClosed", "(", ")", ")", "{", "return", ";", "}", "_state", "=", "_state", ".", "closePeer", "(", ")", ";", "int", "code", "=", "fIs...
Read a close frame.
[ "Read", "a", "close", "frame", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L328-L359
44,294
baratine/baratine
web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java
WebSocketBase.fail
@Override public void fail(Throwable exn) { log.log(Level.WARNING, exn.toString(), exn); }
java
@Override public void fail(Throwable exn) { log.log(Level.WARNING, exn.toString(), exn); }
[ "@", "Override", "public", "void", "fail", "(", "Throwable", "exn", ")", "{", "log", ".", "log", "(", "Level", ".", "WARNING", ",", "exn", ".", "toString", "(", ")", ",", "exn", ")", ";", "}" ]
Close the websocket with a failure.
[ "Close", "the", "websocket", "with", "a", "failure", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/websocket/WebSocketBase.java#L376-L380
44,295
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.lookup
public static PathImpl lookup(String url) { PathImpl pwd = getPwd(); if (! url.startsWith("/")) { return pwd.lookup(url, null); } else { return PWD.lookup(url, null); } }
java
public static PathImpl lookup(String url) { PathImpl pwd = getPwd(); if (! url.startsWith("/")) { return pwd.lookup(url, null); } else { return PWD.lookup(url, null); } }
[ "public", "static", "PathImpl", "lookup", "(", "String", "url", ")", "{", "PathImpl", "pwd", "=", "getPwd", "(", ")", ";", "if", "(", "!", "url", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "return", "pwd", ".", "lookup", "(", "url", ",", "null...
Returns a new path relative to the current directory. @param url a relative or absolute url @return the new path.
[ "Returns", "a", "new", "path", "relative", "to", "the", "current", "directory", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L86-L96
44,296
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.getPwd
public static PathImpl getPwd() { PathImpl pwd = ENV_PWD.get(); if (pwd == null) { if (PWD == null) { /* JNI set later PWD = JniFilePath.create(); if (PWD == null) PWD = new FilePath(null); */ PWD = new FilePath(null); } pwd = PWD; ...
java
public static PathImpl getPwd() { PathImpl pwd = ENV_PWD.get(); if (pwd == null) { if (PWD == null) { /* JNI set later PWD = JniFilePath.create(); if (PWD == null) PWD = new FilePath(null); */ PWD = new FilePath(null); } pwd = PWD; ...
[ "public", "static", "PathImpl", "getPwd", "(", ")", "{", "PathImpl", "pwd", "=", "ENV_PWD", ".", "get", "(", ")", ";", "if", "(", "pwd", "==", "null", ")", "{", "if", "(", "PWD", "==", "null", ")", "{", "/* JNI set later\n PWD = JniFilePath.create()...
Returns a path for the current directory.
[ "Returns", "a", "path", "for", "the", "current", "directory", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L106-L125
44,297
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.lookupNative
public static PathImpl lookupNative(String url, Map<String,Object> attr) { return getPwd().lookupNative(url, attr); }
java
public static PathImpl lookupNative(String url, Map<String,Object> attr) { return getPwd().lookupNative(url, attr); }
[ "public", "static", "PathImpl", "lookupNative", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "attr", ")", "{", "return", "getPwd", "(", ")", ".", "lookupNative", "(", "url", ",", "attr", ")", ";", "}" ]
Returns a native filesystem path with attributes. @param url a relative path using the native filesystem conventions. @param attr attributes used in searching for the url
[ "Returns", "a", "native", "filesystem", "path", "with", "attributes", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L227-L230
44,298
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.openRead
public static ReadStreamOld openRead(InputStream is) { if (is instanceof ReadStreamOld) return (ReadStreamOld) is; VfsStreamOld s = new VfsStreamOld(is, null); return new ReadStreamOld(s); }
java
public static ReadStreamOld openRead(InputStream is) { if (is instanceof ReadStreamOld) return (ReadStreamOld) is; VfsStreamOld s = new VfsStreamOld(is, null); return new ReadStreamOld(s); }
[ "public", "static", "ReadStreamOld", "openRead", "(", "InputStream", "is", ")", "{", "if", "(", "is", "instanceof", "ReadStreamOld", ")", "return", "(", "ReadStreamOld", ")", "is", ";", "VfsStreamOld", "s", "=", "new", "VfsStreamOld", "(", "is", ",", "null",...
Creates new ReadStream from an InputStream
[ "Creates", "new", "ReadStream", "from", "an", "InputStream" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L243-L250
44,299
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.openRead
public static ReadStreamOld openRead(Reader reader) { if (reader instanceof ReadStreamOld.StreamReader) return ((ReadStreamOld.StreamReader) reader).getStream(); ReaderWriterStream s = new ReaderWriterStream(reader, null); ReadStreamOld is = new ReadStreamOld(s); try { is.setEncoding(...
java
public static ReadStreamOld openRead(Reader reader) { if (reader instanceof ReadStreamOld.StreamReader) return ((ReadStreamOld.StreamReader) reader).getStream(); ReaderWriterStream s = new ReaderWriterStream(reader, null); ReadStreamOld is = new ReadStreamOld(s); try { is.setEncoding(...
[ "public", "static", "ReadStreamOld", "openRead", "(", "Reader", "reader", ")", "{", "if", "(", "reader", "instanceof", "ReadStreamOld", ".", "StreamReader", ")", "return", "(", "(", "ReadStreamOld", ".", "StreamReader", ")", "reader", ")", ".", "getStream", "(...
Creates a ReadStream from a Reader
[ "Creates", "a", "ReadStream", "from", "a", "Reader" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L261-L274