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
104,900
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/internal/data/XmlDataHandler.java
XmlDataHandler.transferToSpecificBuilderAndReset
private void transferToSpecificBuilderAndReset() { // version if (currentTag == Tag.VERSION) { dataBuilder.setVersion(buffer.toString()); } // robot browser addToRobotBuilder(); // build browser addToBrowserBuilder(); // build operating system addToOperatingSystemBuilder(); // build browser ...
java
private void transferToSpecificBuilderAndReset() { // version if (currentTag == Tag.VERSION) { dataBuilder.setVersion(buffer.toString()); } // robot browser addToRobotBuilder(); // build browser addToBrowserBuilder(); // build operating system addToOperatingSystemBuilder(); // build browser ...
[ "private", "void", "transferToSpecificBuilderAndReset", "(", ")", "{", "// version", "if", "(", "currentTag", "==", "Tag", ".", "VERSION", ")", "{", "dataBuilder", ".", "setVersion", "(", "buffer", ".", "toString", "(", ")", ")", ";", "}", "// robot browser", ...
Transfers all characters of a specific tag to the corresponding builder and resets the string buffer.
[ "Transfers", "all", "characters", "of", "a", "specific", "tag", "to", "the", "corresponding", "builder", "and", "resets", "the", "string", "buffer", "." ]
215fb652723c52866572cff885f52a3fe67b9db5
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/internal/data/XmlDataHandler.java#L665-L700
104,901
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java
CachingXmlDataStore.deleteCacheFile
private static void deleteCacheFile(final File cacheFile) { try { if (cacheFile.delete()) { LOG.warn(String.format(MSG_CACHE_FILE_IS_DAMAGED_AND_DELETED, cacheFile.getPath())); } else { LOG.warn(String.format(MSG_CACHE_FILE_IS_DAMAGED, cacheFile.getPath())); } } catch (final Exception e) { LOG.w...
java
private static void deleteCacheFile(final File cacheFile) { try { if (cacheFile.delete()) { LOG.warn(String.format(MSG_CACHE_FILE_IS_DAMAGED_AND_DELETED, cacheFile.getPath())); } else { LOG.warn(String.format(MSG_CACHE_FILE_IS_DAMAGED, cacheFile.getPath())); } } catch (final Exception e) { LOG.w...
[ "private", "static", "void", "deleteCacheFile", "(", "final", "File", "cacheFile", ")", "{", "try", "{", "if", "(", "cacheFile", ".", "delete", "(", ")", ")", "{", "LOG", ".", "warn", "(", "String", ".", "format", "(", "MSG_CACHE_FILE_IS_DAMAGED_AND_DELETED"...
Removes the given cache file because it contains damaged content. @param cacheFile cache file to delete
[ "Removes", "the", "given", "cache", "file", "because", "it", "contains", "damaged", "content", "." ]
215fb652723c52866572cff885f52a3fe67b9db5
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java#L219-L229
104,902
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java
CachingXmlDataStore.readCacheFileAsFallback
private static DataStore readCacheFileAsFallback(@Nonnull final DataReader reader, @Nonnull final File cacheFile, @Nonnull final Charset charset, @Nonnull final DataStore fallback) { DataStore fallbackDataStore; if (!isEmpty(cacheFile, charset)) { final URL cacheFileUrl = UrlUtil.toUrl(cacheFile); try { ...
java
private static DataStore readCacheFileAsFallback(@Nonnull final DataReader reader, @Nonnull final File cacheFile, @Nonnull final Charset charset, @Nonnull final DataStore fallback) { DataStore fallbackDataStore; if (!isEmpty(cacheFile, charset)) { final URL cacheFileUrl = UrlUtil.toUrl(cacheFile); try { ...
[ "private", "static", "DataStore", "readCacheFileAsFallback", "(", "@", "Nonnull", "final", "DataReader", "reader", ",", "@", "Nonnull", "final", "File", "cacheFile", ",", "@", "Nonnull", "final", "Charset", "charset", ",", "@", "Nonnull", "final", "DataStore", "...
Tries to read the content of specified cache file and returns them as fallback data store. If the cache file contains unexpected data the given fallback data store will be returned instead. @param reader data reader to read the given {@code dataUrl} @param cacheFile file with cached <em>UAS data</em> in XML format or ...
[ "Tries", "to", "read", "the", "content", "of", "specified", "cache", "file", "and", "returns", "them", "as", "fallback", "data", "store", ".", "If", "the", "cache", "file", "contains", "unexpected", "data", "the", "given", "fallback", "data", "store", "will"...
215fb652723c52866572cff885f52a3fe67b9db5
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java#L286-L303
104,903
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java
ProxyOverrider.activate
public void activate(InetAddress host, int port, Collection<String> nonProxyHosts) { for (String scheme : new String[] {"http", "https"}) { String currentProxyHost = System.getProperty(scheme + ".proxyHost"); String currentProxyPort = System.getProperty(scheme + ".proxyPort"); ...
java
public void activate(InetAddress host, int port, Collection<String> nonProxyHosts) { for (String scheme : new String[] {"http", "https"}) { String currentProxyHost = System.getProperty(scheme + ".proxyHost"); String currentProxyPort = System.getProperty(scheme + ".proxyPort"); ...
[ "public", "void", "activate", "(", "InetAddress", "host", ",", "int", "port", ",", "Collection", "<", "String", ">", "nonProxyHosts", ")", "{", "for", "(", "String", "scheme", ":", "new", "String", "[", "]", "{", "\"http\"", ",", "\"https\"", "}", ")", ...
Activates a proxy override for the given URI scheme.
[ "Activates", "a", "proxy", "override", "for", "the", "given", "URI", "scheme", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java#L43-L63
104,904
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java
ProxyOverrider.deactivateAll
public void deactivateAll() { for (String scheme : new String[] {"http", "https"}) { InetSocketAddress originalProxy = originalProxies.remove(scheme); if (originalProxy != null) { System.setProperty(scheme + ".proxyHost", originalProxy.getHostName()); Syst...
java
public void deactivateAll() { for (String scheme : new String[] {"http", "https"}) { InetSocketAddress originalProxy = originalProxies.remove(scheme); if (originalProxy != null) { System.setProperty(scheme + ".proxyHost", originalProxy.getHostName()); Syst...
[ "public", "void", "deactivateAll", "(", ")", "{", "for", "(", "String", "scheme", ":", "new", "String", "[", "]", "{", "\"http\"", ",", "\"https\"", "}", ")", "{", "InetSocketAddress", "originalProxy", "=", "originalProxies", ".", "remove", "(", "scheme", ...
Deactivates all proxy overrides restoring the pre-existing proxy settings if any.
[ "Deactivates", "all", "proxy", "overrides", "restoring", "the", "pre", "-", "existing", "proxy", "settings", "if", "any", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java#L68-L86
104,905
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java
ProxyOverrider.getOriginalProxySelector
@Deprecated public ProxySelector getOriginalProxySelector() { return new ProxySelector() { @Override public List<Proxy> select(URI uri) { InetSocketAddress address = originalProxies.get(uri.getScheme()); if (address != null && !(originalNonProxyHosts.c...
java
@Deprecated public ProxySelector getOriginalProxySelector() { return new ProxySelector() { @Override public List<Proxy> select(URI uri) { InetSocketAddress address = originalProxies.get(uri.getScheme()); if (address != null && !(originalNonProxyHosts.c...
[ "@", "Deprecated", "public", "ProxySelector", "getOriginalProxySelector", "(", ")", "{", "return", "new", "ProxySelector", "(", ")", "{", "@", "Override", "public", "List", "<", "Proxy", ">", "select", "(", "URI", "uri", ")", "{", "InetSocketAddress", "address...
Used by the Betamax proxy so that it can use pre-existing proxy settings when forwarding requests that do not match anything on tape. @return a proxy selector that uses the overridden proxy settings if any.
[ "Used", "by", "the", "Betamax", "proxy", "so", "that", "it", "can", "use", "pre", "-", "existing", "proxy", "settings", "when", "forwarding", "requests", "that", "do", "not", "match", "anything", "on", "tape", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java#L94-L111
104,906
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java
ProxyOverrider.lookupChainedProxies
@Override public void lookupChainedProxies(HttpRequest request, Queue<ChainedProxy> chainedProxies) { final InetSocketAddress originalProxy = originalProxies.get(URI.create(request.getUri()).getScheme()); if (originalProxy != null) { ChainedProxy chainProxy = new ChainedProxyAdapter() { ...
java
@Override public void lookupChainedProxies(HttpRequest request, Queue<ChainedProxy> chainedProxies) { final InetSocketAddress originalProxy = originalProxies.get(URI.create(request.getUri()).getScheme()); if (originalProxy != null) { ChainedProxy chainProxy = new ChainedProxyAdapter() { ...
[ "@", "Override", "public", "void", "lookupChainedProxies", "(", "HttpRequest", "request", ",", "Queue", "<", "ChainedProxy", ">", "chainedProxies", ")", "{", "final", "InetSocketAddress", "originalProxy", "=", "originalProxies", ".", "get", "(", "URI", ".", "creat...
Used by LittleProxy to connect to a downstream proxy if there is one.
[ "Used", "by", "LittleProxy", "to", "connect", "to", "a", "downstream", "proxy", "if", "there", "is", "one", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/util/ProxyOverrider.java#L116-L130
104,907
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/Recorder.java
Recorder.start
public void start(String tapeName, Optional<TapeMode> mode, Optional<MatchRule> matchRule) { if (tape != null) { throw new IllegalStateException("start called when Recorder is already started"); } tape = getTapeLoader().loadTape(tapeName); tape.setMode(mode.or(configuration....
java
public void start(String tapeName, Optional<TapeMode> mode, Optional<MatchRule> matchRule) { if (tape != null) { throw new IllegalStateException("start called when Recorder is already started"); } tape = getTapeLoader().loadTape(tapeName); tape.setMode(mode.or(configuration....
[ "public", "void", "start", "(", "String", "tapeName", ",", "Optional", "<", "TapeMode", ">", "mode", ",", "Optional", "<", "MatchRule", ">", "matchRule", ")", "{", "if", "(", "tape", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "...
Starts the Recorder, inserting a tape with the specified parameters. @param tapeName the name of the tape. @param mode the tape mode. If not supplied the default mode from the configuration is used. @param matchRule the rules used to match recordings on the tape. If not supplied a default is used. @throws IllegalStat...
[ "Starts", "the", "Recorder", "inserting", "a", "tape", "with", "the", "specified", "parameters", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/Recorder.java#L55-L67
104,908
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/Recorder.java
Recorder.stop
public void stop() { if (tape == null) { throw new IllegalStateException("stop called when Recorder is not started"); } for (RecorderListener listener : listeners) { listener.onRecorderStop(); } getTapeLoader().writeTape(tape); tape = null; }
java
public void stop() { if (tape == null) { throw new IllegalStateException("stop called when Recorder is not started"); } for (RecorderListener listener : listeners) { listener.onRecorderStop(); } getTapeLoader().writeTape(tape); tape = null; }
[ "public", "void", "stop", "(", ")", "{", "if", "(", "tape", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"stop called when Recorder is not started\"", ")", ";", "}", "for", "(", "RecorderListener", "listener", ":", "listeners", ")", ...
Stops the Recorder and writes its current tape out to a file. @throws IllegalStateException if the Recorder is not started.
[ "Stops", "the", "Recorder", "and", "writes", "its", "current", "tape", "out", "to", "a", "file", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/Recorder.java#L82-L92
104,909
betamaxteam/betamax
betamax-core/src/main/java/software/betamax/Configuration.java
Configuration.getIgnoreHosts
public Collection<String> getIgnoreHosts() { if (isIgnoreLocalhost()) { return new ImmutableSet.Builder<String>() .addAll(ignoreHosts) .addAll(Network.getLocalAddresses()) .build(); } else { return ignoreHosts; }...
java
public Collection<String> getIgnoreHosts() { if (isIgnoreLocalhost()) { return new ImmutableSet.Builder<String>() .addAll(ignoreHosts) .addAll(Network.getLocalAddresses()) .build(); } else { return ignoreHosts; }...
[ "public", "Collection", "<", "String", ">", "getIgnoreHosts", "(", ")", "{", "if", "(", "isIgnoreLocalhost", "(", ")", ")", "{", "return", "new", "ImmutableSet", ".", "Builder", "<", "String", ">", "(", ")", ".", "addAll", "(", "ignoreHosts", ")", ".", ...
Hosts that are ignored by Betamax. Any connections made will be allowed to proceed normally and not be intercepted.
[ "Hosts", "that", "are", "ignored", "by", "Betamax", ".", "Any", "connections", "made", "will", "be", "allowed", "to", "proceed", "normally", "and", "not", "be", "intercepted", "." ]
30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0
https://github.com/betamaxteam/betamax/blob/30f29db9a2e2975f9d8ccd28ee3f4cea2bdf16e0/betamax-core/src/main/java/software/betamax/Configuration.java#L127-L136
104,910
webdriverextensions/webdriverextensions
src/main/java/com/github/webdriverextensions/internal/junitrunner/AnnotationUtils.java
AnnotationUtils.getAnnotationAttributes
public static Map<String, Object> getAnnotationAttributes(Annotation annotation, boolean classValuesAsString) { Map<String, Object> attrs = new HashMap<>(); Method[] methods = annotation.annotationType().getDeclaredMethods(); for (Method method : methods) { if (method.getParameterTyp...
java
public static Map<String, Object> getAnnotationAttributes(Annotation annotation, boolean classValuesAsString) { Map<String, Object> attrs = new HashMap<>(); Method[] methods = annotation.annotationType().getDeclaredMethods(); for (Method method : methods) { if (method.getParameterTyp...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "getAnnotationAttributes", "(", "Annotation", "annotation", ",", "boolean", "classValuesAsString", ")", "{", "Map", "<", "String", ",", "Object", ">", "attrs", "=", "new", "HashMap", "<>", "(", ")...
Retrieve the given annotation's attributes as a Map. @param annotation the annotation to retrieve the attributes for @param classValuesAsString whether to turn Class references into Strings (for compatibility with {@link org.springframework.core.type.AnnotationMetadata} or to preserve them as Class references @return t...
[ "Retrieve", "the", "given", "annotation", "s", "attributes", "as", "a", "Map", "." ]
80151a2bb4fe92b093e60b1e628b8c3d73fb1cc1
https://github.com/webdriverextensions/webdriverextensions/blob/80151a2bb4fe92b093e60b1e628b8c3d73fb1cc1/src/main/java/com/github/webdriverextensions/internal/junitrunner/AnnotationUtils.java#L81-L109
104,911
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.enableOrDisableExternalEntityParsing
protected static void enableOrDisableExternalEntityParsing( DocumentBuilderFactory factory, boolean enableExternalEntities) { // Feature list drawn from: // https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing /* Enable or disable external general entities */ ...
java
protected static void enableOrDisableExternalEntityParsing( DocumentBuilderFactory factory, boolean enableExternalEntities) { // Feature list drawn from: // https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing /* Enable or disable external general entities */ ...
[ "protected", "static", "void", "enableOrDisableExternalEntityParsing", "(", "DocumentBuilderFactory", "factory", ",", "boolean", "enableExternalEntities", ")", "{", "// Feature list drawn from:", "// https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing", "/* Enable or dis...
Explicitly enable or disable the 'external-general-entities' and 'external-parameter-entities' features of the underlying DocumentBuilderFactory. TODO This is a naive approach that simply tries to apply all known feature name/URL values in turn until one succeeds, or none do. @param factory factory which will have ex...
[ "Explicitly", "enable", "or", "disable", "the", "external", "-", "general", "-", "entities", "and", "external", "-", "parameter", "-", "entities", "features", "of", "the", "underlying", "DocumentBuilderFactory", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L135-L190
104,912
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.createDocumentImpl
protected static Document createDocumentImpl( String name, String namespaceURI, boolean enableExternalEntities, boolean isNamespaceAware) throws ParserConfigurationException, FactoryConfigurationError { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); fa...
java
protected static Document createDocumentImpl( String name, String namespaceURI, boolean enableExternalEntities, boolean isNamespaceAware) throws ParserConfigurationException, FactoryConfigurationError { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); fa...
[ "protected", "static", "Document", "createDocumentImpl", "(", "String", "name", ",", "String", "namespaceURI", ",", "boolean", "enableExternalEntities", ",", "boolean", "isNamespaceAware", ")", "throws", "ParserConfigurationException", ",", "FactoryConfigurationError", "{",...
Construct an XML Document with a default namespace with the given root element. @param name the name of the document's root element. @param namespaceURI default namespace URI for document, ignored if null or empty. @param enableExternalEntities enable external entities; beware of XML External Entity (XXE) injection. @...
[ "Construct", "an", "XML", "Document", "with", "a", "default", "namespace", "with", "the", "given", "root", "element", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L211-L229
104,913
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.parseDocumentImpl
protected static Document parseDocumentImpl( InputSource inputSource, boolean enableExternalEntities, boolean isNamespaceAware) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setN...
java
protected static Document parseDocumentImpl( InputSource inputSource, boolean enableExternalEntities, boolean isNamespaceAware) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setN...
[ "protected", "static", "Document", "parseDocumentImpl", "(", "InputSource", "inputSource", ",", "boolean", "enableExternalEntities", ",", "boolean", "isNamespaceAware", ")", "throws", "ParserConfigurationException", ",", "SAXException", ",", "IOException", "{", "DocumentBui...
Return an XML Document parsed from the given input source. @param inputSource an XML document input source that will be parsed into a DOM. @param enableExternalEntities enable external entities; beware of XML External Entity (XXE) injection. @param isNamespaceAware enable or disable namespace awareness in the underlyi...
[ "Return", "an", "XML", "Document", "parsed", "from", "the", "given", "input", "source", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L250-L261
104,914
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.stripWhitespaceOnlyTextNodesImpl
protected void stripWhitespaceOnlyTextNodesImpl() throws XPathExpressionException { XPathFactory xpathFactory = XPathFactory.newInstance(); // XPath to find empty text nodes. XPathExpression xpathExp = xpathFactory.newXPath().compile( "//text()[normalize-space(.) = '']");...
java
protected void stripWhitespaceOnlyTextNodesImpl() throws XPathExpressionException { XPathFactory xpathFactory = XPathFactory.newInstance(); // XPath to find empty text nodes. XPathExpression xpathExp = xpathFactory.newXPath().compile( "//text()[normalize-space(.) = '']");...
[ "protected", "void", "stripWhitespaceOnlyTextNodesImpl", "(", ")", "throws", "XPathExpressionException", "{", "XPathFactory", "xpathFactory", "=", "XPathFactory", ".", "newInstance", "(", ")", ";", "// XPath to find empty text nodes.", "XPathExpression", "xpathExp", "=", "x...
Find and delete from the underlying Document any text nodes that contain nothing but whitespace, such as newlines and tab or space characters used to indent or pretty-print an XML document. Uses approach I documented on StackOverflow: http://stackoverflow.com/a/979606/4970 @throws XPathExpressionException
[ "Find", "and", "delete", "from", "the", "underlying", "Document", "any", "text", "nodes", "that", "contain", "nothing", "but", "whitespace", "such", "as", "newlines", "and", "tab", "or", "space", "characters", "used", "to", "indent", "or", "pretty", "-", "pr...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L273-L288
104,915
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.importXMLBuilderImpl
protected void importXMLBuilderImpl(BaseXMLBuilder builder) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); Node importedNode = getDocument().importNode( builder.getDocument().getDocumentElement(), true); this.xmlNode.appendChild(importedNode); }
java
protected void importXMLBuilderImpl(BaseXMLBuilder builder) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); Node importedNode = getDocument().importNode( builder.getDocument().getDocumentElement(), true); this.xmlNode.appendChild(importedNode); }
[ "protected", "void", "importXMLBuilderImpl", "(", "BaseXMLBuilder", "builder", ")", "{", "assertElementContainsNoOrWhitespaceOnlyTextNodes", "(", "this", ".", "xmlNode", ")", ";", "Node", "importedNode", "=", "getDocument", "(", ")", ".", "importNode", "(", "builder",...
Imports another BaseXMLBuilder document into this document at the current position. The entire document provided is imported. @param builder the BaseXMLBuilder document to be imported.
[ "Imports", "another", "BaseXMLBuilder", "document", "into", "this", "document", "at", "the", "current", "position", ".", "The", "entire", "document", "provided", "is", "imported", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L312-L317
104,916
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.xpathQuery
public Object xpathQuery(String xpath, QName type, NamespaceContext nsContext) throws XPathExpressionException { XPathFactory xpathFactory = XPathFactory.newInstance(); XPath xPath = xpathFactory.newXPath(); if (nsContext != null) { xPath.setNamespaceContext(n...
java
public Object xpathQuery(String xpath, QName type, NamespaceContext nsContext) throws XPathExpressionException { XPathFactory xpathFactory = XPathFactory.newInstance(); XPath xPath = xpathFactory.newXPath(); if (nsContext != null) { xPath.setNamespaceContext(n...
[ "public", "Object", "xpathQuery", "(", "String", "xpath", ",", "QName", "type", ",", "NamespaceContext", "nsContext", ")", "throws", "XPathExpressionException", "{", "XPathFactory", "xpathFactory", "=", "XPathFactory", ".", "newInstance", "(", ")", ";", "XPath", "...
Return the result of evaluating an XPath query on the builder's DOM using the given namespace. Returns null if the query finds nothing, or finds a node that does not match the type specified by returnType. @param xpath an XPath expression @param type the type the XPath is expected to resolve to, e.g: {@link XPathConst...
[ "Return", "the", "result", "of", "evaluating", "an", "XPath", "query", "on", "the", "builder", "s", "DOM", "using", "the", "given", "namespace", ".", "Returns", "null", "if", "the", "query", "finds", "nothing", "or", "finds", "a", "node", "that", "does", ...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L398-L412
104,917
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.xpathQuery
public Object xpathQuery(String xpath, QName type) throws XPathExpressionException { return xpathQuery(xpath, type, null); }
java
public Object xpathQuery(String xpath, QName type) throws XPathExpressionException { return xpathQuery(xpath, type, null); }
[ "public", "Object", "xpathQuery", "(", "String", "xpath", ",", "QName", "type", ")", "throws", "XPathExpressionException", "{", "return", "xpathQuery", "(", "xpath", ",", "type", ",", "null", ")", ";", "}" ]
Return the result of evaluating an XPath query on the builder's DOM. Returns null if the query finds nothing, or finds a node that does not match the type specified by returnType. @param xpath an XPath expression @param type the type the XPath is expected to resolve to, e.g: {@link XPathConstants#NODE}, {@link XPathCo...
[ "Return", "the", "result", "of", "evaluating", "an", "XPath", "query", "on", "the", "builder", "s", "DOM", ".", "Returns", "null", "if", "the", "query", "finds", "nothing", "or", "finds", "a", "node", "that", "does", "not", "match", "the", "type", "speci...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L434-L437
104,918
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.elementImpl
protected Element elementImpl(String name, String namespaceURI) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); if (namespaceURI == null) { return getDocument().createElement(name); } else { return getDocument().createElementNS(namespaceURI, name); ...
java
protected Element elementImpl(String name, String namespaceURI) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); if (namespaceURI == null) { return getDocument().createElement(name); } else { return getDocument().createElementNS(namespaceURI, name); ...
[ "protected", "Element", "elementImpl", "(", "String", "name", ",", "String", "namespaceURI", ")", "{", "assertElementContainsNoOrWhitespaceOnlyTextNodes", "(", "this", ".", "xmlNode", ")", ";", "if", "(", "namespaceURI", "==", "null", ")", "{", "return", "getDocum...
Add a named and namespaced XML element to the document as a child of this builder's node. @param name the name of the XML element. @param namespaceURI a namespace URI @return @throws IllegalStateException if you attempt to add a child element to an XML node that already contains a text node value.
[ "Add", "a", "named", "and", "namespaced", "XML", "element", "to", "the", "document", "as", "a", "child", "of", "this", "builder", "s", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L542-L549
104,919
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.elementBeforeImpl
protected Element elementBeforeImpl(String name) { String prefix = getPrefixFromQualifiedName(name); String namespaceURI = this.xmlNode.lookupNamespaceURI(prefix); return elementBeforeImpl(name, namespaceURI); }
java
protected Element elementBeforeImpl(String name) { String prefix = getPrefixFromQualifiedName(name); String namespaceURI = this.xmlNode.lookupNamespaceURI(prefix); return elementBeforeImpl(name, namespaceURI); }
[ "protected", "Element", "elementBeforeImpl", "(", "String", "name", ")", "{", "String", "prefix", "=", "getPrefixFromQualifiedName", "(", "name", ")", ";", "String", "namespaceURI", "=", "this", ".", "xmlNode", ".", "lookupNamespaceURI", "(", "prefix", ")", ";",...
Add a named XML element to the document as a sibling element that precedes the position of this builder node. When adding an element to a namespaced document, the new node will be assigned a namespace matching it's qualified name prefix (if any) or the document's default namespace. NOTE: If the element has a prefix th...
[ "Add", "a", "named", "XML", "element", "to", "the", "document", "as", "a", "sibling", "element", "that", "precedes", "the", "position", "of", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L765-L769
104,920
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.elementBeforeImpl
protected Element elementBeforeImpl(String name, String namespaceURI) { Node parentNode = this.xmlNode.getParentNode(); assertElementContainsNoOrWhitespaceOnlyTextNodes(parentNode); Element newElement = (namespaceURI == null ? getDocument().createElement(name) : getDocum...
java
protected Element elementBeforeImpl(String name, String namespaceURI) { Node parentNode = this.xmlNode.getParentNode(); assertElementContainsNoOrWhitespaceOnlyTextNodes(parentNode); Element newElement = (namespaceURI == null ? getDocument().createElement(name) : getDocum...
[ "protected", "Element", "elementBeforeImpl", "(", "String", "name", ",", "String", "namespaceURI", ")", "{", "Node", "parentNode", "=", "this", ".", "xmlNode", ".", "getParentNode", "(", ")", ";", "assertElementContainsNoOrWhitespaceOnlyTextNodes", "(", "parentNode", ...
Add a named and namespaced XML element to the document as a sibling element that precedes the position of this builder node. @param name the name of the XML element. @param namespaceURI a namespace URI @throws IllegalStateException if you attempt to add a sibling element to a node where there are already one or more ...
[ "Add", "a", "named", "and", "namespaced", "XML", "element", "to", "the", "document", "as", "a", "sibling", "element", "that", "precedes", "the", "position", "of", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L784-L796
104,921
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.attributeImpl
protected void attributeImpl(String name, String value) { if (! (this.xmlNode instanceof Element)) { throw new RuntimeException( "Cannot add an attribute to non-Element underlying node: " + this.xmlNode); } ((Element) xmlNode).setAttribute(name, value)...
java
protected void attributeImpl(String name, String value) { if (! (this.xmlNode instanceof Element)) { throw new RuntimeException( "Cannot add an attribute to non-Element underlying node: " + this.xmlNode); } ((Element) xmlNode).setAttribute(name, value)...
[ "protected", "void", "attributeImpl", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "!", "(", "this", ".", "xmlNode", "instanceof", "Element", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Cannot add an attribute to non-Element...
Add a named attribute value to the element for this builder node. @param name the attribute's name. @param value the attribute's value.
[ "Add", "a", "named", "attribute", "value", "to", "the", "element", "for", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L806-L813
104,922
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.textImpl
protected void textImpl(String value, boolean replaceText) { // Issue 10: null text values cause exceptions on subsequent call to // Transformer to render document, so we fail-fast here on bad data. if (value == null) { throw new IllegalArgumentException("Illegal null text value"); ...
java
protected void textImpl(String value, boolean replaceText) { // Issue 10: null text values cause exceptions on subsequent call to // Transformer to render document, so we fail-fast here on bad data. if (value == null) { throw new IllegalArgumentException("Illegal null text value"); ...
[ "protected", "void", "textImpl", "(", "String", "value", ",", "boolean", "replaceText", ")", "{", "// Issue 10: null text values cause exceptions on subsequent call to", "// Transformer to render document, so we fail-fast here on bad data.", "if", "(", "value", "==", "null", ")",...
Add or replace the text value of an element for this builder node. @param value the text value to set or add to the element. @param replaceText if True any existing text content of the node is replaced with the given text value, if the given value is appended to any existing text.
[ "Add", "or", "replace", "the", "text", "value", "of", "an", "element", "for", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L824-L836
104,923
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.instructionImpl
protected void instructionImpl(String target, String data) { xmlNode.appendChild(getDocument().createProcessingInstruction(target, data)); }
java
protected void instructionImpl(String target, String data) { xmlNode.appendChild(getDocument().createProcessingInstruction(target, data)); }
[ "protected", "void", "instructionImpl", "(", "String", "target", ",", "String", "data", ")", "{", "xmlNode", ".", "appendChild", "(", "getDocument", "(", ")", ".", "createProcessingInstruction", "(", "target", ",", "data", ")", ")", ";", "}" ]
Add an instruction to the element represented by this builder node. @param target the target value for the instruction. @param data the data value for the instruction
[ "Add", "an", "instruction", "to", "the", "element", "represented", "by", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L881-L883
104,924
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.insertInstructionImpl
protected void insertInstructionImpl(String target, String data) { getDocument().insertBefore( getDocument().createProcessingInstruction(target, data), xmlNode); }
java
protected void insertInstructionImpl(String target, String data) { getDocument().insertBefore( getDocument().createProcessingInstruction(target, data), xmlNode); }
[ "protected", "void", "insertInstructionImpl", "(", "String", "target", ",", "String", "data", ")", "{", "getDocument", "(", ")", ".", "insertBefore", "(", "getDocument", "(", ")", ".", "createProcessingInstruction", "(", "target", ",", "data", ")", ",", "xmlNo...
Insert an instruction before the element represented by this builder node. @param target the target value for the instruction. @param data the data value for the instruction
[ "Insert", "an", "instruction", "before", "the", "element", "represented", "by", "this", "builder", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L893-L897
104,925
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.namespaceImpl
protected void namespaceImpl(String prefix, String namespaceURI) { if (! (this.xmlNode instanceof Element)) { throw new RuntimeException( "Cannot add an attribute to non-Element underlying node: " + this.xmlNode); } if (prefix != null && prefix.length(...
java
protected void namespaceImpl(String prefix, String namespaceURI) { if (! (this.xmlNode instanceof Element)) { throw new RuntimeException( "Cannot add an attribute to non-Element underlying node: " + this.xmlNode); } if (prefix != null && prefix.length(...
[ "protected", "void", "namespaceImpl", "(", "String", "prefix", ",", "String", "namespaceURI", ")", "{", "if", "(", "!", "(", "this", ".", "xmlNode", "instanceof", "Element", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Cannot add an attribute to no...
Add an XML namespace attribute to this builder's element node. @param prefix a prefix for the namespace URI within the document, may be null or empty in which case a default "xmlns" attribute is created. @param namespaceURI a namespace uri
[ "Add", "an", "XML", "namespace", "attribute", "to", "this", "builder", "s", "element", "node", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L918-L931
104,926
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.asString
public String asString() throws TransformerException { Properties outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); return asString(outputProperties); }
java
public String asString() throws TransformerException { Properties outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); return asString(outputProperties); }
[ "public", "String", "asString", "(", ")", "throws", "TransformerException", "{", "Properties", "outputProperties", "=", "new", "Properties", "(", ")", ";", "outputProperties", ".", "put", "(", "javax", ".", "xml", ".", "transform", ".", "OutputKeys", ".", "OMI...
Serialize the XML document to a string excluding the XML declaration. @return the XML document as a string without the XML declaration at the beginning of the output. @throws TransformerException
[ "Serialize", "the", "XML", "document", "to", "a", "string", "excluding", "the", "XML", "declaration", "." ]
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L1400-L1404
104,927
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
XMLBuilder2.parse
public static XMLBuilder2 parse( InputSource inputSource, boolean enableExternalEntities, boolean isNamespaceAware) { try { return new XMLBuilder2( parseDocumentImpl( inputSource, enableExternalEntities, isNamespaceAware)); } catch (Par...
java
public static XMLBuilder2 parse( InputSource inputSource, boolean enableExternalEntities, boolean isNamespaceAware) { try { return new XMLBuilder2( parseDocumentImpl( inputSource, enableExternalEntities, isNamespaceAware)); } catch (Par...
[ "public", "static", "XMLBuilder2", "parse", "(", "InputSource", "inputSource", ",", "boolean", "enableExternalEntities", ",", "boolean", "isNamespaceAware", ")", "{", "try", "{", "return", "new", "XMLBuilder2", "(", "parseDocumentImpl", "(", "inputSource", ",", "ena...
Construct a builder from an existing XML document. The provided XML document will be parsed and an XMLBuilder2 object referencing the document's root element will be returned. @param inputSource an XML document input source that will be parsed into a DOM. @param enableExternalEntities enable external entities; beware ...
[ "Construct", "a", "builder", "from", "an", "existing", "XML", "document", ".", "The", "provided", "XML", "document", "will", "be", "parsed", "and", "an", "XMLBuilder2", "object", "referencing", "the", "document", "s", "root", "element", "will", "be", "returned...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/XMLBuilder2.java#L223-L238
104,928
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
XMLBuilder2.parse
public static XMLBuilder2 parse( String xmlString, boolean enableExternalEntities, boolean isNamespaceAware) { return XMLBuilder2.parse( new InputSource(new StringReader(xmlString)), enableExternalEntities, isNamespaceAware); }
java
public static XMLBuilder2 parse( String xmlString, boolean enableExternalEntities, boolean isNamespaceAware) { return XMLBuilder2.parse( new InputSource(new StringReader(xmlString)), enableExternalEntities, isNamespaceAware); }
[ "public", "static", "XMLBuilder2", "parse", "(", "String", "xmlString", ",", "boolean", "enableExternalEntities", ",", "boolean", "isNamespaceAware", ")", "{", "return", "XMLBuilder2", ".", "parse", "(", "new", "InputSource", "(", "new", "StringReader", "(", "xmlS...
Construct a builder from an existing XML document string. The provided XML document will be parsed and an XMLBuilder2 object referencing the document's root element will be returned. @param xmlString an XML document string that will be parsed into a DOM. @param enableExternalEntities enable external entities; beware o...
[ "Construct", "a", "builder", "from", "an", "existing", "XML", "document", "string", ".", "The", "provided", "XML", "document", "will", "be", "parsed", "and", "an", "XMLBuilder2", "object", "referencing", "the", "document", "s", "root", "element", "will", "be",...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/XMLBuilder2.java#L255-L262
104,929
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
XMLBuilder2.parse
public static XMLBuilder2 parse(File xmlFile, boolean enableExternalEntities, boolean isNamespaceAware) { try { return XMLBuilder2.parse( new InputSource(new FileReader(xmlFile)), enableExternalEntities, isNamespaceAware); } catch (...
java
public static XMLBuilder2 parse(File xmlFile, boolean enableExternalEntities, boolean isNamespaceAware) { try { return XMLBuilder2.parse( new InputSource(new FileReader(xmlFile)), enableExternalEntities, isNamespaceAware); } catch (...
[ "public", "static", "XMLBuilder2", "parse", "(", "File", "xmlFile", ",", "boolean", "enableExternalEntities", ",", "boolean", "isNamespaceAware", ")", "{", "try", "{", "return", "XMLBuilder2", ".", "parse", "(", "new", "InputSource", "(", "new", "FileReader", "(...
Construct a builder from an existing XML document file. The provided XML document will be parsed and an XMLBuilder2 object referencing the document's root element will be returned. @param xmlFile an XML document file that will be parsed into a DOM. @param enableExternalEntities enable external entities; beware of XML ...
[ "Construct", "a", "builder", "from", "an", "existing", "XML", "document", "file", ".", "The", "provided", "XML", "document", "will", "be", "parsed", "and", "an", "XMLBuilder2", "object", "referencing", "the", "document", "s", "root", "element", "will", "be", ...
7c224b8e8ed79808509322cb141dab5a88dd3cec
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/XMLBuilder2.java#L282-L293
104,930
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.initProperties
private void initProperties() { center = new SimpleObjectProperty<>(); center.addListener((observable, oldValue, newValue) -> { // check if this is the same value that was just reported from the map using object equality if (newValue != lastCoordinateFromMap.get()) { ...
java
private void initProperties() { center = new SimpleObjectProperty<>(); center.addListener((observable, oldValue, newValue) -> { // check if this is the same value that was just reported from the map using object equality if (newValue != lastCoordinateFromMap.get()) { ...
[ "private", "void", "initProperties", "(", ")", "{", "center", "=", "new", "SimpleObjectProperty", "<>", "(", ")", ";", "center", ".", "addListener", "(", "(", "observable", ",", "oldValue", ",", "newValue", ")", "->", "{", "// check if this is the same value tha...
initializes the JavaFX properties.
[ "initializes", "the", "JavaFX", "properties", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L203-L272
104,931
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.setCenterInMap
private void setCenterInMap() { final Coordinate actCenter = getCenter(); if (getInitialized() && null != actCenter) { if (logger.isTraceEnabled()) { logger.trace("setting center in OpenLayers map: {}, animation: {}", actCenter, animationDuration.get()); } ...
java
private void setCenterInMap() { final Coordinate actCenter = getCenter(); if (getInitialized() && null != actCenter) { if (logger.isTraceEnabled()) { logger.trace("setting center in OpenLayers map: {}, animation: {}", actCenter, animationDuration.get()); } ...
[ "private", "void", "setCenterInMap", "(", ")", "{", "final", "Coordinate", "actCenter", "=", "getCenter", "(", ")", ";", "if", "(", "getInitialized", "(", ")", "&&", "null", "!=", "actCenter", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")...
sets the value of the center property in the OL map.
[ "sets", "the", "value", "of", "the", "center", "property", "in", "the", "OL", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L338-L348
104,932
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.setZoomInMap
private void setZoomInMap() { if (getInitialized()) { final int zoomInt = (int) getZoom(); if (logger.isTraceEnabled()) { logger.trace("setting zoom in OpenLayers map: {}, animation: {}", zoomInt, animationDuration.get()); } jsMapView.call("setZoom...
java
private void setZoomInMap() { if (getInitialized()) { final int zoomInt = (int) getZoom(); if (logger.isTraceEnabled()) { logger.trace("setting zoom in OpenLayers map: {}, animation: {}", zoomInt, animationDuration.get()); } jsMapView.call("setZoom...
[ "private", "void", "setZoomInMap", "(", ")", "{", "if", "(", "getInitialized", "(", ")", ")", "{", "final", "int", "zoomInt", "=", "(", "int", ")", "getZoom", "(", ")", ";", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ...
sets the value of the actual zoom property in the OL map.
[ "sets", "the", "value", "of", "the", "actual", "zoom", "property", "in", "the", "OL", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L353-L361
104,933
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.checkApiKey
private boolean checkApiKey(final MapType mapTypeToCheck) { switch (requireNonNull(mapTypeToCheck)) { case BINGMAPS_ROAD: case BINGMAPS_AERIAL: return bingMapsApiKey.isPresent(); default: return true; } }
java
private boolean checkApiKey(final MapType mapTypeToCheck) { switch (requireNonNull(mapTypeToCheck)) { case BINGMAPS_ROAD: case BINGMAPS_AERIAL: return bingMapsApiKey.isPresent(); default: return true; } }
[ "private", "boolean", "checkApiKey", "(", "final", "MapType", "mapTypeToCheck", ")", "{", "switch", "(", "requireNonNull", "(", "mapTypeToCheck", ")", ")", "{", "case", "BINGMAPS_ROAD", ":", "case", "BINGMAPS_AERIAL", ":", "return", "bingMapsApiKey", ".", "isPrese...
checks if the given map type needs an api key, and if so, if it is set. @param mapTypeToCheck the map type @return true if either the map type does not need an api key or an api key was set.
[ "checks", "if", "the", "given", "map", "type", "needs", "an", "api", "key", "and", "if", "so", "if", "it", "is", "set", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L370-L378
104,934
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.setMapTypeInMap
private void setMapTypeInMap() { if (getInitialized()) { final String mapTypeName = getMapType().toString(); if (logger.isDebugEnabled()) { logger.debug("setting map type in OpenLayers map: {}", mapTypeName); } bingMapsApiKey.ifPresent(apiKey -> js...
java
private void setMapTypeInMap() { if (getInitialized()) { final String mapTypeName = getMapType().toString(); if (logger.isDebugEnabled()) { logger.debug("setting map type in OpenLayers map: {}", mapTypeName); } bingMapsApiKey.ifPresent(apiKey -> js...
[ "private", "void", "setMapTypeInMap", "(", ")", "{", "if", "(", "getInitialized", "(", ")", ")", "{", "final", "String", "mapTypeName", "=", "getMapType", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", "...
sets the value of the mapType property in the OL map.
[ "sets", "the", "value", "of", "the", "mapType", "property", "in", "the", "OL", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L383-L400
104,935
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.addCoordinateLine
public MapView addCoordinateLine(final CoordinateLine coordinateLine) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { // sync on the coordinatesLines map as the cleaner thread accesses this...
java
public MapView addCoordinateLine(final CoordinateLine coordinateLine) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { // sync on the coordinatesLines map as the cleaner thread accesses this...
[ "public", "MapView", "addCoordinateLine", "(", "final", "CoordinateLine", "coordinateLine", ")", "{", "if", "(", "!", "getInitialized", "(", ")", ")", "{", "if", "(", "logger", ".", "isWarnEnabled", "(", ")", ")", "{", "logger", ".", "warn", "(", "MAP_VIEW...
add a CoordinateLine to the map. If it was already added, nothing happens. The MapView only stores a weak reference to the object, so the caller must keep a reference in order to prevent the line to be removed from the map. This method must only be called after the map is initialized, otherwise a warning is logged and ...
[ "add", "a", "CoordinateLine", "to", "the", "map", ".", "If", "it", "was", "already", "added", "nothing", "happens", ".", "The", "MapView", "only", "stores", "a", "weak", "reference", "to", "the", "object", "so", "the", "caller", "must", "keep", "a", "ref...
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L488-L529
104,936
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.setCoordinateLineVisibleInMap
private void setCoordinateLineVisibleInMap(final String coordinateLineId) { if (null != coordinateLineId) { final WeakReference<CoordinateLine> coordinateLineWeakReference = coordinateLines.get(coordinateLineId); if (null != coordinateLineWeakReference) { final Coordinate...
java
private void setCoordinateLineVisibleInMap(final String coordinateLineId) { if (null != coordinateLineId) { final WeakReference<CoordinateLine> coordinateLineWeakReference = coordinateLines.get(coordinateLineId); if (null != coordinateLineWeakReference) { final Coordinate...
[ "private", "void", "setCoordinateLineVisibleInMap", "(", "final", "String", "coordinateLineId", ")", "{", "if", "(", "null", "!=", "coordinateLineId", ")", "{", "final", "WeakReference", "<", "CoordinateLine", ">", "coordinateLineWeakReference", "=", "coordinateLines", ...
shows or hides the coordinateline in the map according to it's visible property. @param coordinateLineId the id of the CoordinateLine object
[ "shows", "or", "hides", "the", "coordinateline", "in", "the", "map", "according", "to", "it", "s", "visible", "property", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L537-L551
104,937
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.addLabel
public MapView addLabel(final MapLabel mapLabel) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { if (null == requireNonNull(mapLabel).getPosition()) { if (logger.isDebugEnab...
java
public MapView addLabel(final MapLabel mapLabel) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { if (null == requireNonNull(mapLabel).getPosition()) { if (logger.isDebugEnab...
[ "public", "MapView", "addLabel", "(", "final", "MapLabel", "mapLabel", ")", "{", "if", "(", "!", "getInitialized", "(", ")", ")", "{", "if", "(", "logger", ".", "isWarnEnabled", "(", ")", ")", "{", "logger", ".", "warn", "(", "MAP_VIEW_NOT_YET_INITIALIZED"...
adds a label to the map. If it was already added, nothing is changed. If the MapView is not yet initialized, a warning is logged and nothing changes. If the label has no coordinate set, it is not added and a logging entry is written. The MapView only keeps a weak reference to the label, so the caller must keep a refer...
[ "adds", "a", "label", "to", "the", "map", ".", "If", "it", "was", "already", "added", "nothing", "is", "changed", ".", "If", "the", "MapView", "is", "not", "yet", "initialized", "a", "warning", "is", "logged", "and", "nothing", "changes", ".", "If", "t...
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L567-L600
104,938
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.addMapCoordinateElement
private void addMapCoordinateElement(final MapCoordinateElement mapCoordinateElement) { final String id = mapCoordinateElement.getId(); // create change listeners for the coordinate and the visibility and store them with the // marker's id. final ChangeListener<Coordinate> coordinateChan...
java
private void addMapCoordinateElement(final MapCoordinateElement mapCoordinateElement) { final String id = mapCoordinateElement.getId(); // create change listeners for the coordinate and the visibility and store them with the // marker's id. final ChangeListener<Coordinate> coordinateChan...
[ "private", "void", "addMapCoordinateElement", "(", "final", "MapCoordinateElement", "mapCoordinateElement", ")", "{", "final", "String", "id", "=", "mapCoordinateElement", ".", "getId", "(", ")", ";", "// create change listeners for the coordinate and the visibility and store t...
sets up the internal information about a MapCoordinate Element. @param mapCoordinateElement the MapCooordinate Element
[ "sets", "up", "the", "internal", "information", "about", "a", "MapCoordinate", "Element", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L608-L629
104,939
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.setMarkerVisibleInMap
private void setMarkerVisibleInMap(final String id) { if (null != id) { final WeakReference<MapCoordinateElement> weakReference = mapCoordinateElements.get(id); if (null != weakReference) { final MapCoordinateElement mapCoordinateElement = weakReference.get(); ...
java
private void setMarkerVisibleInMap(final String id) { if (null != id) { final WeakReference<MapCoordinateElement> weakReference = mapCoordinateElements.get(id); if (null != weakReference) { final MapCoordinateElement mapCoordinateElement = weakReference.get(); ...
[ "private", "void", "setMarkerVisibleInMap", "(", "final", "String", "id", ")", "{", "if", "(", "null", "!=", "id", ")", "{", "final", "WeakReference", "<", "MapCoordinateElement", ">", "weakReference", "=", "mapCoordinateElements", ".", "get", "(", "id", ")", ...
sets the visibility of a MapCoordinateElement in the map. @param id the marker to show or hide
[ "sets", "the", "visibility", "of", "a", "MapCoordinateElement", "in", "the", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L649-L663
104,940
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.moveMapCoordinateElementInMap
private void moveMapCoordinateElementInMap(final String id) { if (getInitialized() && null != id) { final WeakReference<MapCoordinateElement> weakReference = mapCoordinateElements.get(id); if (null != weakReference) { final MapCoordinateElement mapCoordinateElement = weak...
java
private void moveMapCoordinateElementInMap(final String id) { if (getInitialized() && null != id) { final WeakReference<MapCoordinateElement> weakReference = mapCoordinateElements.get(id); if (null != weakReference) { final MapCoordinateElement mapCoordinateElement = weak...
[ "private", "void", "moveMapCoordinateElementInMap", "(", "final", "String", "id", ")", "{", "if", "(", "getInitialized", "(", ")", "&&", "null", "!=", "id", ")", "{", "final", "WeakReference", "<", "MapCoordinateElement", ">", "weakReference", "=", "mapCoordinat...
adjusts the mapCoordinateElement's position in the map. @param id the id of the element to move
[ "adjusts", "the", "mapCoordinateElement", "s", "position", "in", "the", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L671-L686
104,941
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.addMarker
public MapView addMarker(final Marker marker) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { if (null == requireNonNull(marker).getPosition()) { if (logger.isTraceEnabled()...
java
public MapView addMarker(final Marker marker) { if (!getInitialized()) { if (logger.isWarnEnabled()) { logger.warn(MAP_VIEW_NOT_YET_INITIALIZED); } } else { if (null == requireNonNull(marker).getPosition()) { if (logger.isTraceEnabled()...
[ "public", "MapView", "addMarker", "(", "final", "Marker", "marker", ")", "{", "if", "(", "!", "getInitialized", "(", ")", ")", "{", "if", "(", "logger", ".", "isWarnEnabled", "(", ")", ")", "{", "logger", ".", "warn", "(", "MAP_VIEW_NOT_YET_INITIALIZED", ...
adds a marker to the map. If it was already added, nothing is changed. If the MapView is not yet initialized, a warning is logged and nothing changes. If the marker has no coordinate set, it is not added and a logging entry is written. The MapView only keeps a weak reference to the marker, so the caller must keep a re...
[ "adds", "a", "marker", "to", "the", "map", ".", "If", "it", "was", "already", "added", "nothing", "is", "changed", ".", "If", "the", "MapView", "is", "not", "yet", "initialized", "a", "warning", "is", "logged", "and", "nothing", "changes", ".", "If", "...
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L702-L732
104,942
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
MapView.createDataURI
@SuppressWarnings("UnusedDeclaration") private String createDataURI(final URL imageURL) { return imgCache.computeIfAbsent(imageURL, url -> { String dataUrl = null; try (final InputStream isGuess = url.openStream(); final InputStream isConvert = url.openStream(); ...
java
@SuppressWarnings("UnusedDeclaration") private String createDataURI(final URL imageURL) { return imgCache.computeIfAbsent(imageURL, url -> { String dataUrl = null; try (final InputStream isGuess = url.openStream(); final InputStream isConvert = url.openStream(); ...
[ "@", "SuppressWarnings", "(", "\"UnusedDeclaration\"", ")", "private", "String", "createDataURI", "(", "final", "URL", "imageURL", ")", "{", "return", "imgCache", ".", "computeIfAbsent", "(", "imageURL", ",", "url", "->", "{", "String", "dataUrl", "=", "null", ...
loads an image and converts it's data to a base64 encoded data url. NOT NEEDED AT THE MOMENT @param imageURL where to load the image from, may not be null @return the encoded image as data url
[ "loads", "an", "image", "and", "converts", "it", "s", "data", "to", "a", "base64", "encoded", "data", "url", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L751-L785
104,943
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.showLink
public void showLink(final String href) { if (null != href && !href.isEmpty()) { if (logger.isTraceEnabled()) { logger.trace("JS asks to browse to {}", href); } if (!Desktop.isDesktopSupported()) { if (logger.isWarnEnabl...
java
public void showLink(final String href) { if (null != href && !href.isEmpty()) { if (logger.isTraceEnabled()) { logger.trace("JS asks to browse to {}", href); } if (!Desktop.isDesktopSupported()) { if (logger.isWarnEnabl...
[ "public", "void", "showLink", "(", "final", "String", "href", ")", "{", "if", "(", "null", "!=", "href", "&&", "!", "href", ".", "isEmpty", "(", ")", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", ...
called when an a href in the map is clicked and shows the URL in the default browser. @param href the url to show
[ "called", "when", "an", "a", "href", "in", "the", "map", "is", "clicked", "and", "shows", "the", "URL", "in", "the", "default", "browser", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1343-L1362
104,944
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.processMarkerClicked
private void processMarkerClicked(final String name, final ClickType clickType) { if (logger.isTraceEnabled()) { logger.trace("JS reports marker {} clicked {}", name, clickType); } synchronized (mapCoordinateElements) { if (mapCoordinateElements.contai...
java
private void processMarkerClicked(final String name, final ClickType clickType) { if (logger.isTraceEnabled()) { logger.trace("JS reports marker {} clicked {}", name, clickType); } synchronized (mapCoordinateElements) { if (mapCoordinateElements.contai...
[ "private", "void", "processMarkerClicked", "(", "final", "String", "name", ",", "final", "ClickType", "clickType", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"JS reports marker {} clicked {}\"", ",", ...
processes a marker click @param name name of the marker @param clickType the type of click
[ "processes", "a", "marker", "click" ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1474-L1508
104,945
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.processLabelClicked
private void processLabelClicked(final String name, final ClickType clickType) { if (logger.isTraceEnabled()) { logger.trace("JS reports label {} clicked {}", name, clickType); } synchronized (mapCoordinateElements) { if (mapCoordinateElements.contains...
java
private void processLabelClicked(final String name, final ClickType clickType) { if (logger.isTraceEnabled()) { logger.trace("JS reports label {} clicked {}", name, clickType); } synchronized (mapCoordinateElements) { if (mapCoordinateElements.contains...
[ "private", "void", "processLabelClicked", "(", "final", "String", "name", ",", "final", "ClickType", "clickType", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"JS reports label {} clicked {}\"", ",", ...
called when a label was clicked. @param name name of the lael @param clickType the type of click
[ "called", "when", "a", "label", "was", "clicked", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1588-L1624
104,946
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.zoomChanged
public void zoomChanged(double newZoom) { final long roundedZoom = Math.round(newZoom); if (logger.isTraceEnabled()) { logger.trace("JS reports zoom value {}", roundedZoom); } lastZoomFromMap.set(roundedZoom); setZoom(roundedZoom); }
java
public void zoomChanged(double newZoom) { final long roundedZoom = Math.round(newZoom); if (logger.isTraceEnabled()) { logger.trace("JS reports zoom value {}", roundedZoom); } lastZoomFromMap.set(roundedZoom); setZoom(roundedZoom); }
[ "public", "void", "zoomChanged", "(", "double", "newZoom", ")", "{", "final", "long", "roundedZoom", "=", "Math", ".", "round", "(", "newZoom", ")", ";", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"JS...
called when the user changed the zoom with the controls in the map. @param newZoom new zoom value
[ "called", "when", "the", "user", "changed", "the", "zoom", "with", "the", "controls", "in", "the", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1632-L1639
104,947
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.extentSelected
public void extentSelected(double latMin, double lonMin, double latMax, double lonMax) { final Extent extent = Extent.forCoordinates(new Coordinate(latMin, lonMin), new Coordinate(latMax, lonMax)); if (logger.isTraceEnabled()) { logger.trace("JS reports extend selected: {}", exte...
java
public void extentSelected(double latMin, double lonMin, double latMax, double lonMax) { final Extent extent = Extent.forCoordinates(new Coordinate(latMin, lonMin), new Coordinate(latMax, lonMax)); if (logger.isTraceEnabled()) { logger.trace("JS reports extend selected: {}", exte...
[ "public", "void", "extentSelected", "(", "double", "latMin", ",", "double", "lonMin", ",", "double", "latMax", ",", "double", "lonMax", ")", "{", "final", "Extent", "extent", "=", "Extent", ".", "forCoordinates", "(", "new", "Coordinate", "(", "latMin", ",",...
called when the user selected an extent by dragging the mouse with modifier pressed. @param latMin latitude of upper left corner @param lonMin longitude of upper left corner @param latMax latitude of lower right corner @param lonMax longitude of lower right corner
[ "called", "when", "the", "user", "selected", "an", "extent", "by", "dragging", "the", "mouse", "with", "modifier", "pressed", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1653-L1659
104,948
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.extentChanged
public void extentChanged(double latMin, double lonMin, double latMax, double lonMax) { final Extent extent = Extent.forCoordinates(new Coordinate(latMin, lonMin), new Coordinate(latMax, lonMax)); if (logger.isTraceEnabled()) { logger.trace("JS reports extend change: {}", extent)...
java
public void extentChanged(double latMin, double lonMin, double latMax, double lonMax) { final Extent extent = Extent.forCoordinates(new Coordinate(latMin, lonMin), new Coordinate(latMax, lonMax)); if (logger.isTraceEnabled()) { logger.trace("JS reports extend change: {}", extent)...
[ "public", "void", "extentChanged", "(", "double", "latMin", ",", "double", "lonMin", ",", "double", "latMax", ",", "double", "lonMax", ")", "{", "final", "Extent", "extent", "=", "Extent", ".", "forCoordinates", "(", "new", "Coordinate", "(", "latMin", ",", ...
called when the map extent changed by changing the center or zoom of the map. @param latMin latitude of upper left corner @param lonMin longitude of upper left corner @param latMax latitude of lower right corner @param lonMax longitude of lower right corner
[ "called", "when", "the", "map", "extent", "changed", "by", "changing", "the", "center", "or", "zoom", "of", "the", "map", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1673-L1679
104,949
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/Extent.java
Extent.forCoordinates
public static Extent forCoordinates(Collection<? extends Coordinate> coordinates) { requireNonNull(coordinates); if (coordinates.size() < 2) { throw new IllegalArgumentException(); } double minLatitude = Double.MAX_VALUE; double maxLatitude = -Double.MAX_VALUE; ...
java
public static Extent forCoordinates(Collection<? extends Coordinate> coordinates) { requireNonNull(coordinates); if (coordinates.size() < 2) { throw new IllegalArgumentException(); } double minLatitude = Double.MAX_VALUE; double maxLatitude = -Double.MAX_VALUE; ...
[ "public", "static", "Extent", "forCoordinates", "(", "Collection", "<", "?", "extends", "Coordinate", ">", "coordinates", ")", "{", "requireNonNull", "(", "coordinates", ")", ";", "if", "(", "coordinates", ".", "size", "(", ")", "<", "2", ")", "{", "throw"...
creates the extent of the given coordinates. @param coordinates the coordinates @return Extent for the coorinates @throws java.lang.IllegalArgumentException when less than 2 coordinates or null are passed in @throws NullPointerException when coordinates is null
[ "creates", "the", "extent", "of", "the", "given", "coordinates", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/Extent.java#L64-L81
104,950
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/offline/CachingURLStreamHandlerFactory.java
CachingURLStreamHandlerFactory.getURLStreamHandler
private URLStreamHandler getURLStreamHandler(final String protocol) { try { final Method method = URL.class.getDeclaredMethod("getURLStreamHandler", String.class); method.setAccessible(true); return (URLStreamHandler) method.invoke(null, protocol); } catch (final Exce...
java
private URLStreamHandler getURLStreamHandler(final String protocol) { try { final Method method = URL.class.getDeclaredMethod("getURLStreamHandler", String.class); method.setAccessible(true); return (URLStreamHandler) method.invoke(null, protocol); } catch (final Exce...
[ "private", "URLStreamHandler", "getURLStreamHandler", "(", "final", "String", "protocol", ")", "{", "try", "{", "final", "Method", "method", "=", "URL", ".", "class", ".", "getDeclaredMethod", "(", "\"getURLStreamHandler\"", ",", "String", ".", "class", ")", ";"...
returns the URL class's stream handler for a protocol. this uses inspection. @param protocol the protocol @return the URLStreamHandler, null if it cannot be retrieved.
[ "returns", "the", "URL", "class", "s", "stream", "handler", "for", "a", "protocol", ".", "this", "uses", "inspection", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/offline/CachingURLStreamHandlerFactory.java#L74-L85
104,951
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/offline/CachingURLStreamHandlerFactory.java
CachingURLStreamHandlerFactory.createURLStreamHandler
@Override public URLStreamHandler createURLStreamHandler(final String protocol) { if (null == protocol) { throw new IllegalArgumentException("null protocol not allowed"); } if (logger.isTraceEnabled()) { logger.trace("need to create URLStreamHandler for protocol {}", ...
java
@Override public URLStreamHandler createURLStreamHandler(final String protocol) { if (null == protocol) { throw new IllegalArgumentException("null protocol not allowed"); } if (logger.isTraceEnabled()) { logger.trace("need to create URLStreamHandler for protocol {}", ...
[ "@", "Override", "public", "URLStreamHandler", "createURLStreamHandler", "(", "final", "String", "protocol", ")", "{", "if", "(", "null", "==", "protocol", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"null protocol not allowed\"", ")", ";", "}", "...
default Handler for http and https.
[ "default", "Handler", "for", "http", "and", "https", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/offline/CachingURLStreamHandlerFactory.java#L89-L153
104,952
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/Marker.java
Marker.createProvided
public static Marker createProvided(Provided provided) { requireNonNull(provided); return new Marker(Marker.class.getResource("/markers/" + provided.getFilename()), provided.getOffsetX(), provided.getOffsetY()); }
java
public static Marker createProvided(Provided provided) { requireNonNull(provided); return new Marker(Marker.class.getResource("/markers/" + provided.getFilename()), provided.getOffsetX(), provided.getOffsetY()); }
[ "public", "static", "Marker", "createProvided", "(", "Provided", "provided", ")", "{", "requireNonNull", "(", "provided", ")", ";", "return", "new", "Marker", "(", "Marker", ".", "class", ".", "getResource", "(", "\"/markers/\"", "+", "provided", ".", "getFile...
return a provided Marker with the given color. @param provided desired color @return Marker @throws NullPointerException when provided is null
[ "return", "a", "provided", "Marker", "with", "the", "given", "color", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/Marker.java#L66-L70
104,953
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/Marker.java
Marker.attachLabel
public Marker attachLabel(MapLabel mapLabel) { optMapLabel = Optional.of(requireNonNull(mapLabel)); mapLabel.setMarker(this); mapLabel.visibleProperty().bind(visibleProperty()); mapLabel.positionProperty().bind(positionProperty()); return this; }
java
public Marker attachLabel(MapLabel mapLabel) { optMapLabel = Optional.of(requireNonNull(mapLabel)); mapLabel.setMarker(this); mapLabel.visibleProperty().bind(visibleProperty()); mapLabel.positionProperty().bind(positionProperty()); return this; }
[ "public", "Marker", "attachLabel", "(", "MapLabel", "mapLabel", ")", "{", "optMapLabel", "=", "Optional", ".", "of", "(", "requireNonNull", "(", "mapLabel", ")", ")", ";", "mapLabel", ".", "setMarker", "(", "this", ")", ";", "mapLabel", ".", "visibleProperty...
attaches the MapLabel to this Marker @param mapLabel the MapLabel to attach @return this object @throws NullPointerException of mapLabel is null
[ "attaches", "the", "MapLabel", "to", "this", "Marker" ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/Marker.java#L149-L155
104,954
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/Marker.java
Marker.detachLabel
public Marker detachLabel() { optMapLabel.ifPresent(mapLabel -> { mapLabel.setMarker(null); mapLabel.visibleProperty().unbind(); mapLabel.positionProperty().unbind(); }); optMapLabel = Optional.empty(); return this; }
java
public Marker detachLabel() { optMapLabel.ifPresent(mapLabel -> { mapLabel.setMarker(null); mapLabel.visibleProperty().unbind(); mapLabel.positionProperty().unbind(); }); optMapLabel = Optional.empty(); return this; }
[ "public", "Marker", "detachLabel", "(", ")", "{", "optMapLabel", ".", "ifPresent", "(", "mapLabel", "->", "{", "mapLabel", ".", "setMarker", "(", "null", ")", ";", "mapLabel", ".", "visibleProperty", "(", ")", ".", "unbind", "(", ")", ";", "mapLabel", "....
detaches an attached Label. @return this object
[ "detaches", "an", "attached", "Label", "." ]
202091de492ab7a8b000c77efd833029f7f0ef92
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/Marker.java#L162-L170
104,955
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/ResponseParser.java
ResponseParser.parse
public Object parse(SerializerHandler serializerHandler, InputStream response, boolean debugMode) throws XMLRPCException { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document dom = ...
java
public Object parse(SerializerHandler serializerHandler, InputStream response, boolean debugMode) throws XMLRPCException { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document dom = ...
[ "public", "Object", "parse", "(", "SerializerHandler", "serializerHandler", ",", "InputStream", "response", ",", "boolean", "debugMode", ")", "throws", "XMLRPCException", "{", "try", "{", "DocumentBuilderFactory", "factory", "=", "DocumentBuilderFactory", ".", "newInsta...
The given InputStream must contain the xml response from an xmlrpc server. This method extract the content of it as an object. @param response The InputStream of the server response. @return The returned object. @throws XMLRPCException Will be thrown whenever something fails. @throws XMLRPCServerException Will be thro...
[ "The", "given", "InputStream", "must", "contain", "the", "xml", "response", "from", "an", "xmlrpc", "server", ".", "This", "method", "extract", "the", "content", "of", "it", "as", "an", "object", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/ResponseParser.java#L42-L90
104,956
gturri/aXMLRPC
src/main/java/de/timroes/base64/Base64.java
Base64.decode
public static byte[] decode(String in) { in = in.replaceAll("\\r|\\n",""); if(in.length() % 4 != 0) { throw new IllegalArgumentException("The length of the input string must be a multiple of four."); } if(!in.matches("^[A-Za-z0-9+/]*[=]{0,3}$")) { throw new IllegalArgumentException("The argument contain...
java
public static byte[] decode(String in) { in = in.replaceAll("\\r|\\n",""); if(in.length() % 4 != 0) { throw new IllegalArgumentException("The length of the input string must be a multiple of four."); } if(!in.matches("^[A-Za-z0-9+/]*[=]{0,3}$")) { throw new IllegalArgumentException("The argument contain...
[ "public", "static", "byte", "[", "]", "decode", "(", "String", "in", ")", "{", "in", "=", "in", ".", "replaceAll", "(", "\"\\\\r|\\\\n\"", ",", "\"\"", ")", ";", "if", "(", "in", ".", "length", "(", ")", "%", "4", "!=", "0", ")", "{", "throw", ...
Decode a base64 encoded string to a byte array. @param in A string representing a base64 encoding. @return The decoded byte array.
[ "Decode", "a", "base64", "encoded", "string", "to", "a", "byte", "array", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/base64/Base64.java#L31-L66
104,957
gturri/aXMLRPC
src/main/java/de/timroes/base64/Base64.java
Base64.encode
public static String encode(Byte[] in) { byte[] tmp = new byte[in.length]; for(int i = 0; i < tmp.length; i++) { tmp[i] = in[i]; } return encode(tmp); }
java
public static String encode(Byte[] in) { byte[] tmp = new byte[in.length]; for(int i = 0; i < tmp.length; i++) { tmp[i] = in[i]; } return encode(tmp); }
[ "public", "static", "String", "encode", "(", "Byte", "[", "]", "in", ")", "{", "byte", "[", "]", "tmp", "=", "new", "byte", "[", "in", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tmp", ".", "length", ";", "i", ...
Encode a Byte array and return the encoded string. @param in A string to encode. @return The encoded byte array.
[ "Encode", "a", "Byte", "array", "and", "return", "the", "encoded", "string", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/base64/Base64.java#L94-L100
104,958
gturri/aXMLRPC
src/main/java/de/timroes/base64/Base64.java
Base64.encode
public static String encode(byte[] in) { StringBuilder builder = new StringBuilder(4 * ((in.length+2)/3)); byte[] encoded = encodeAsBytes(in); for(int i = 0; i < encoded.length; i++) { builder.append(code[encoded[i]+1]); if(i % 72 == 71) builder.append("\n"); } return builder.toString(); }
java
public static String encode(byte[] in) { StringBuilder builder = new StringBuilder(4 * ((in.length+2)/3)); byte[] encoded = encodeAsBytes(in); for(int i = 0; i < encoded.length; i++) { builder.append(code[encoded[i]+1]); if(i % 72 == 71) builder.append("\n"); } return builder.toString(); }
[ "public", "static", "String", "encode", "(", "byte", "[", "]", "in", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "4", "*", "(", "(", "in", ".", "length", "+", "2", ")", "/", "3", ")", ")", ";", "byte", "[", "]", "encod...
Encode a byte array and return the encoded string. @param in A string to encode. @return The encoded byte array.
[ "Encode", "a", "byte", "array", "and", "return", "the", "encoded", "string", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/base64/Base64.java#L108-L117
104,959
gturri/aXMLRPC
src/main/java/de/timroes/base64/Base64.java
Base64.encodeAsBytes
public static byte[] encodeAsBytes(byte[] inArray) { // Output string must be 4 * floor((n+2)/3) large byte[] out = new byte[4 * ((inArray.length+2)/3)]; // Create padded input array with the next largest length that is a multiple of 3 byte[] in = new byte[(inArray.length+2)/3*3]; // Copy content form unpadd...
java
public static byte[] encodeAsBytes(byte[] inArray) { // Output string must be 4 * floor((n+2)/3) large byte[] out = new byte[4 * ((inArray.length+2)/3)]; // Create padded input array with the next largest length that is a multiple of 3 byte[] in = new byte[(inArray.length+2)/3*3]; // Copy content form unpadd...
[ "public", "static", "byte", "[", "]", "encodeAsBytes", "(", "byte", "[", "]", "inArray", ")", "{", "// Output string must be 4 * floor((n+2)/3) large", "byte", "[", "]", "out", "=", "new", "byte", "[", "4", "*", "(", "(", "inArray", ".", "length", "+", "2"...
Encode a byte array and return the encoded byte array. Bytes that has been appended to pad the string to a multiple of four are set to -1 in the array. @param inArray A string to encode. @return The encoded byte array.
[ "Encode", "a", "byte", "array", "and", "return", "the", "encoded", "byte", "array", ".", "Bytes", "that", "has", "been", "appended", "to", "pad", "the", "string", "to", "a", "multiple", "of", "four", "are", "set", "to", "-", "1", "in", "the", "array", ...
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/base64/Base64.java#L137-L161
104,960
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/AuthenticationManager.java
AuthenticationManager.setAuthentication
public void setAuthentication(HttpURLConnection http) { if(user == null || pass == null || user.length() <= 0 || pass.length() <= 0) { return; } String base64login = Base64.encode(user + ":" + pass); http.addRequestProperty("Authorization", "Basic " + base64login); }
java
public void setAuthentication(HttpURLConnection http) { if(user == null || pass == null || user.length() <= 0 || pass.length() <= 0) { return; } String base64login = Base64.encode(user + ":" + pass); http.addRequestProperty("Authorization", "Basic " + base64login); }
[ "public", "void", "setAuthentication", "(", "HttpURLConnection", "http", ")", "{", "if", "(", "user", "==", "null", "||", "pass", "==", "null", "||", "user", ".", "length", "(", ")", "<=", "0", "||", "pass", ".", "length", "(", ")", "<=", "0", ")", ...
Set the authentication at the HttpURLConnection. @param http The HttpURLConnection to set authentication.
[ "Set", "the", "authentication", "at", "the", "HttpURLConnection", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/AuthenticationManager.java#L42-L53
104,961
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/Call.java
Call.getXMLParam
private XmlElement getXMLParam(Object o) throws XMLRPCException { XmlElement param = new XmlElement(XMLRPCClient.PARAM); XmlElement value = new XmlElement(XMLRPCClient.VALUE); param.addChildren(value); value.addChildren(serializerHandler.serialize(o)); return param; }
java
private XmlElement getXMLParam(Object o) throws XMLRPCException { XmlElement param = new XmlElement(XMLRPCClient.PARAM); XmlElement value = new XmlElement(XMLRPCClient.VALUE); param.addChildren(value); value.addChildren(serializerHandler.serialize(o)); return param; }
[ "private", "XmlElement", "getXMLParam", "(", "Object", "o", ")", "throws", "XMLRPCException", "{", "XmlElement", "param", "=", "new", "XmlElement", "(", "XMLRPCClient", ".", "PARAM", ")", ";", "XmlElement", "value", "=", "new", "XmlElement", "(", "XMLRPCClient",...
Generates the param xml tag for a specific parameter object. @param o The parameter object. @return The object serialized into an xml tag. @throws XMLRPCException Will be thrown if the serialization failed.
[ "Generates", "the", "param", "xml", "tag", "for", "a", "specific", "parameter", "object", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/Call.java#L87-L93
104,962
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLRPCClient.java
XMLRPCClient.setCustomHttpHeader
public void setCustomHttpHeader(String headerName, String headerValue) { if(CONTENT_TYPE.equals(headerName) || HOST.equals(headerName) || CONTENT_LENGTH.equals(headerName)) { throw new XMLRPCRuntimeException("You cannot modify the Host, Content-Type or Content-Length header."); } httpParameters.put(headerN...
java
public void setCustomHttpHeader(String headerName, String headerValue) { if(CONTENT_TYPE.equals(headerName) || HOST.equals(headerName) || CONTENT_LENGTH.equals(headerName)) { throw new XMLRPCRuntimeException("You cannot modify the Host, Content-Type or Content-Length header."); } httpParameters.put(headerN...
[ "public", "void", "setCustomHttpHeader", "(", "String", "headerName", ",", "String", "headerValue", ")", "{", "if", "(", "CONTENT_TYPE", ".", "equals", "(", "headerName", ")", "||", "HOST", ".", "equals", "(", "headerName", ")", "||", "CONTENT_LENGTH", ".", ...
Set a HTTP header field to a custom value. You cannot modify the Host or Content-Type field that way. If the field already exists, the old value is overwritten. @param headerName The name of the header field. @param headerValue The new value of the header field.
[ "Set", "a", "HTTP", "header", "field", "to", "a", "custom", "value", ".", "You", "cannot", "modify", "the", "Host", "or", "Content", "-", "Type", "field", "that", "way", ".", "If", "the", "field", "already", "exists", "the", "old", "value", "is", "over...
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java#L344-L350
104,963
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLRPCClient.java
XMLRPCClient.callAsync
public long callAsync(XMLRPCCallback listener, String methodName, Object... params) { long id = System.currentTimeMillis(); new Caller(listener, id, methodName, params).start(); return id; }
java
public long callAsync(XMLRPCCallback listener, String methodName, Object... params) { long id = System.currentTimeMillis(); new Caller(listener, id, methodName, params).start(); return id; }
[ "public", "long", "callAsync", "(", "XMLRPCCallback", "listener", ",", "String", "methodName", ",", "Object", "...", "params", ")", "{", "long", "id", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "new", "Caller", "(", "listener", ",", "id", ",",...
Asynchronously call a remote procedure on the server. The method must be described by a method name. If the method requires parameters, this must be set. When the server returns a response the onResponse method is called on the listener. If the server returns an error the onServerError method is called on the listener...
[ "Asynchronously", "call", "a", "remote", "procedure", "on", "the", "server", ".", "The", "method", "must", "be", "described", "by", "a", "method", "name", ".", "If", "the", "method", "requires", "parameters", "this", "must", "be", "set", ".", "When", "the"...
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java#L485-L489
104,964
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLRPCClient.java
XMLRPCClient.cancel
public void cancel(long id) { // Lookup the background call for the given id. Caller cancel = backgroundCalls.get(id); if(cancel == null) { return; } // Cancel the thread cancel.cancel(); try { // Wait for the thread cancel.join(); } catch (InterruptedException ex) { // Ignore this } ...
java
public void cancel(long id) { // Lookup the background call for the given id. Caller cancel = backgroundCalls.get(id); if(cancel == null) { return; } // Cancel the thread cancel.cancel(); try { // Wait for the thread cancel.join(); } catch (InterruptedException ex) { // Ignore this } ...
[ "public", "void", "cancel", "(", "long", "id", ")", "{", "// Lookup the background call for the given id.", "Caller", "cancel", "=", "backgroundCalls", ".", "get", "(", "id", ")", ";", "if", "(", "cancel", "==", "null", ")", "{", "return", ";", "}", "// Canc...
Cancel a specific asynchronous call. @param id The id of the call as returned by the callAsync method.
[ "Cancel", "a", "specific", "asynchronous", "call", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java#L496-L514
104,965
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLRPCClient.java
XMLRPCClient.createCall
private Call createCall(String method, Object[] params) { if(isFlagSet(FLAGS_STRICT) && !method.matches("^[A-Za-z0-9\\._:/]*$")) { throw new XMLRPCRuntimeException("Method name must only contain A-Z a-z . : _ / "); } return new Call(serializerHandler, method, params); }
java
private Call createCall(String method, Object[] params) { if(isFlagSet(FLAGS_STRICT) && !method.matches("^[A-Za-z0-9\\._:/]*$")) { throw new XMLRPCRuntimeException("Method name must only contain A-Z a-z . : _ / "); } return new Call(serializerHandler, method, params); }
[ "private", "Call", "createCall", "(", "String", "method", ",", "Object", "[", "]", "params", ")", "{", "if", "(", "isFlagSet", "(", "FLAGS_STRICT", ")", "&&", "!", "method", ".", "matches", "(", "\"^[A-Za-z0-9\\\\._:/]*$\"", ")", ")", "{", "throw", "new", ...
Create a call object from a given method string and parameters. @param method The method that should be called. @param params An array of parameters or null if no parameters needed. @return A call object.
[ "Create", "a", "call", "object", "from", "a", "given", "method", "string", "and", "parameters", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLRPCClient.java#L523-L530
104,966
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLUtil.java
XMLUtil.getOnlyTextContent
public static String getOnlyTextContent(NodeList list) throws XMLRPCException { StringBuilder builder = new StringBuilder(); Node n; for(int i = 0; i < list.getLength(); i++) { n = list.item(i); // Skip comments inside text tag. if(n.getNodeType() == Node.COMMENT_NODE) { continue; } if(n.ge...
java
public static String getOnlyTextContent(NodeList list) throws XMLRPCException { StringBuilder builder = new StringBuilder(); Node n; for(int i = 0; i < list.getLength(); i++) { n = list.item(i); // Skip comments inside text tag. if(n.getNodeType() == Node.COMMENT_NODE) { continue; } if(n.ge...
[ "public", "static", "String", "getOnlyTextContent", "(", "NodeList", "list", ")", "throws", "XMLRPCException", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "Node", "n", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Returns the text node from a given NodeList. If the list contains more then just text nodes, an exception will be thrown. @param list The given list of nodes. @return The text of the given node list. @throws XMLRPCException Will be thrown if there is more than just one text node within the list.
[ "Returns", "the", "text", "node", "from", "a", "given", "NodeList", ".", "If", "the", "list", "contains", "more", "then", "just", "text", "nodes", "an", "exception", "will", "be", "thrown", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLUtil.java#L66-L89
104,967
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/XMLUtil.java
XMLUtil.makeXmlTag
public static XmlElement makeXmlTag(String type, String content) { XmlElement xml = new XmlElement(type); xml.setContent(content); return xml; }
java
public static XmlElement makeXmlTag(String type, String content) { XmlElement xml = new XmlElement(type); xml.setContent(content); return xml; }
[ "public", "static", "XmlElement", "makeXmlTag", "(", "String", "type", ",", "String", "content", ")", "{", "XmlElement", "xml", "=", "new", "XmlElement", "(", "type", ")", ";", "xml", ".", "setContent", "(", "content", ")", ";", "return", "xml", ";", "}"...
Creates an xml tag with a given type and content. @param type The type of the xml tag. What will be filled in the <..>. @param content The content of the tag. @return The xml tag with its content as a string.
[ "Creates", "an", "xml", "tag", "with", "a", "given", "type", "and", "content", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/XMLUtil.java#L120-L124
104,968
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/CookieManager.java
CookieManager.readCookies
public void readCookies(HttpURLConnection http) { // Only save cookies if FLAGS_ENABLE_COOKIES has been set. if((flags & XMLRPCClient.FLAGS_ENABLE_COOKIES) == 0) return; String cookie, key; String[] split; // Extract every Set-Cookie field and put the cookie to the cookies map. for(int i = 0; i < http...
java
public void readCookies(HttpURLConnection http) { // Only save cookies if FLAGS_ENABLE_COOKIES has been set. if((flags & XMLRPCClient.FLAGS_ENABLE_COOKIES) == 0) return; String cookie, key; String[] split; // Extract every Set-Cookie field and put the cookie to the cookies map. for(int i = 0; i < http...
[ "public", "void", "readCookies", "(", "HttpURLConnection", "http", ")", "{", "// Only save cookies if FLAGS_ENABLE_COOKIES has been set.", "if", "(", "(", "flags", "&", "XMLRPCClient", ".", "FLAGS_ENABLE_COOKIES", ")", "==", "0", ")", "return", ";", "String", "cookie"...
Read the cookies from an http response. It will look at every Set-Cookie header and put the cookie to the map of cookies. @param http A http connection.
[ "Read", "the", "cookies", "from", "an", "http", "response", ".", "It", "will", "look", "at", "every", "Set", "-", "Cookie", "header", "and", "put", "the", "cookie", "to", "the", "map", "of", "cookies", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/CookieManager.java#L53-L73
104,969
gturri/aXMLRPC
src/main/java/de/timroes/axmlrpc/CookieManager.java
CookieManager.setCookies
public void setCookies(HttpURLConnection http) { // Only save cookies if FLAGS_ENABLE_COOKIES has been set. if((flags & XMLRPCClient.FLAGS_ENABLE_COOKIES) == 0) return; String concat = ""; for(Map.Entry<String,String> cookie : cookies.entrySet()) { concat += cookie.getKey() + "=" + cookie.getValue() + "...
java
public void setCookies(HttpURLConnection http) { // Only save cookies if FLAGS_ENABLE_COOKIES has been set. if((flags & XMLRPCClient.FLAGS_ENABLE_COOKIES) == 0) return; String concat = ""; for(Map.Entry<String,String> cookie : cookies.entrySet()) { concat += cookie.getKey() + "=" + cookie.getValue() + "...
[ "public", "void", "setCookies", "(", "HttpURLConnection", "http", ")", "{", "// Only save cookies if FLAGS_ENABLE_COOKIES has been set.", "if", "(", "(", "flags", "&", "XMLRPCClient", ".", "FLAGS_ENABLE_COOKIES", ")", "==", "0", ")", "return", ";", "String", "concat",...
Write the cookies to a http connection. It will set the Cookie field to all currently set cookies in the map. @param http A http connection.
[ "Write", "the", "cookies", "to", "a", "http", "connection", ".", "It", "will", "set", "the", "Cookie", "field", "to", "all", "currently", "set", "cookies", "in", "the", "map", "." ]
8ca6f95f7eb3a28efaef3569d53adddeb32b6bda
https://github.com/gturri/aXMLRPC/blob/8ca6f95f7eb3a28efaef3569d53adddeb32b6bda/src/main/java/de/timroes/axmlrpc/CookieManager.java#L81-L93
104,970
opitzconsulting/orcas
orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperResultSet.java
WrapperResultSet.usePreparedStatement
protected final void usePreparedStatement( PreparedStatement pPreparedStatement ) throws SQLException { ResultSet lResultSet = null; pPreparedStatement.setFetchSize( 1000 ); setParameter( pPreparedStatement ); try { lResultSet = pPreparedStatement.executeQuery(); useResultSet( ...
java
protected final void usePreparedStatement( PreparedStatement pPreparedStatement ) throws SQLException { ResultSet lResultSet = null; pPreparedStatement.setFetchSize( 1000 ); setParameter( pPreparedStatement ); try { lResultSet = pPreparedStatement.executeQuery(); useResultSet( ...
[ "protected", "final", "void", "usePreparedStatement", "(", "PreparedStatement", "pPreparedStatement", ")", "throws", "SQLException", "{", "ResultSet", "lResultSet", "=", "null", ";", "pPreparedStatement", ".", "setFetchSize", "(", "1000", ")", ";", "setParameter", "("...
Calls setParameter first, than executeQuery on the CallableStatement is called and the resultest is passed to useResultSet.
[ "Calls", "setParameter", "first", "than", "executeQuery", "on", "the", "CallableStatement", "is", "called", "and", "the", "resultest", "is", "passed", "to", "useResultSet", "." ]
9b24c56a060269f90005953b2bd86b329164995b
https://github.com/opitzconsulting/orcas/blob/9b24c56a060269f90005953b2bd86b329164995b/orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperResultSet.java#L53-L74
104,971
opitzconsulting/orcas
orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperResultSet.java
WrapperResultSet.setParameter
protected void setParameter( PreparedStatement pPreparedStatement ) throws SQLException { if( _parameters != null ) { for( int i = 0; i < _parameters.size(); i++ ) { pPreparedStatement.setObject( i + 1, _parameters.get( i ) ); } } }
java
protected void setParameter( PreparedStatement pPreparedStatement ) throws SQLException { if( _parameters != null ) { for( int i = 0; i < _parameters.size(); i++ ) { pPreparedStatement.setObject( i + 1, _parameters.get( i ) ); } } }
[ "protected", "void", "setParameter", "(", "PreparedStatement", "pPreparedStatement", ")", "throws", "SQLException", "{", "if", "(", "_parameters", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_parameters", ".", "size", "(", ")"...
Is called before the CallabelStatement is executed. It is usually used to set parameters. The CallableStatement may not be executed. The default implementaion does nothing.
[ "Is", "called", "before", "the", "CallabelStatement", "is", "executed", ".", "It", "is", "usually", "used", "to", "set", "parameters", ".", "The", "CallableStatement", "may", "not", "be", "executed", ".", "The", "default", "implementaion", "does", "nothing", "...
9b24c56a060269f90005953b2bd86b329164995b
https://github.com/opitzconsulting/orcas/blob/9b24c56a060269f90005953b2bd86b329164995b/orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperResultSet.java#L84-L93
104,972
opitzconsulting/orcas
orcas_core/build_source/orcas_dbdoc/src/main/java/de/oc/dbdoc/export/DotExport.java
DotExport.export
public void export( Graph pGraph, Schema pSchema, DotWriter pDotWriter, boolean pOutRefsOnly ) { pDotWriter.printHeaderStart( pGraph.getStyleForGraph() ); if( pGraph.isCollapseSubgraphs() ) { _writeSubgraphRecursiveCollapsed( pGraph, pSchema, pDotWriter, pOutRefsOnly ); List<Graph> lEndGraph...
java
public void export( Graph pGraph, Schema pSchema, DotWriter pDotWriter, boolean pOutRefsOnly ) { pDotWriter.printHeaderStart( pGraph.getStyleForGraph() ); if( pGraph.isCollapseSubgraphs() ) { _writeSubgraphRecursiveCollapsed( pGraph, pSchema, pDotWriter, pOutRefsOnly ); List<Graph> lEndGraph...
[ "public", "void", "export", "(", "Graph", "pGraph", ",", "Schema", "pSchema", ",", "DotWriter", "pDotWriter", ",", "boolean", "pOutRefsOnly", ")", "{", "pDotWriter", ".", "printHeaderStart", "(", "pGraph", ".", "getStyleForGraph", "(", ")", ")", ";", "if", "...
Creates a dot File for the Schema.
[ "Creates", "a", "dot", "File", "for", "the", "Schema", "." ]
9b24c56a060269f90005953b2bd86b329164995b
https://github.com/opitzconsulting/orcas/blob/9b24c56a060269f90005953b2bd86b329164995b/orcas_core/build_source/orcas_dbdoc/src/main/java/de/oc/dbdoc/export/DotExport.java#L162-L247
104,973
opitzconsulting/orcas
orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperIteratorResultSet.java
WrapperIteratorResultSet.useResultSet
protected final void useResultSet( ResultSet pResultSet ) throws SQLException { boolean lFirst = true; if( !pResultSet.next() ) { handleEmptyResultSet(); } else { while( lFirst || pResultSet.next() ) { lFirst = false; useResultSetRow( pResultSet ); } ...
java
protected final void useResultSet( ResultSet pResultSet ) throws SQLException { boolean lFirst = true; if( !pResultSet.next() ) { handleEmptyResultSet(); } else { while( lFirst || pResultSet.next() ) { lFirst = false; useResultSetRow( pResultSet ); } ...
[ "protected", "final", "void", "useResultSet", "(", "ResultSet", "pResultSet", ")", "throws", "SQLException", "{", "boolean", "lFirst", "=", "true", ";", "if", "(", "!", "pResultSet", ".", "next", "(", ")", ")", "{", "handleEmptyResultSet", "(", ")", ";", "...
iterates through the resultset and calls the callback methods.
[ "iterates", "through", "the", "resultset", "and", "calls", "the", "callback", "methods", "." ]
9b24c56a060269f90005953b2bd86b329164995b
https://github.com/opitzconsulting/orcas/blob/9b24c56a060269f90005953b2bd86b329164995b/orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperIteratorResultSet.java#L47-L64
104,974
opitzconsulting/orcas
orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperReturnFirstValue.java
WrapperReturnFirstValue.getValueFromResultSet
protected final Object getValueFromResultSet( ResultSet pResultSet ) throws SQLException { if( !pResultSet.next() ) { if( _returnNullInsteadOfNoDataFoundException ) { return null; } throw new NoDataFoundException(); } return pResultSet.getObject( getObjectIndex() ); ...
java
protected final Object getValueFromResultSet( ResultSet pResultSet ) throws SQLException { if( !pResultSet.next() ) { if( _returnNullInsteadOfNoDataFoundException ) { return null; } throw new NoDataFoundException(); } return pResultSet.getObject( getObjectIndex() ); ...
[ "protected", "final", "Object", "getValueFromResultSet", "(", "ResultSet", "pResultSet", ")", "throws", "SQLException", "{", "if", "(", "!", "pResultSet", ".", "next", "(", ")", ")", "{", "if", "(", "_returnNullInsteadOfNoDataFoundException", ")", "{", "return", ...
Extracts the first value.
[ "Extracts", "the", "first", "value", "." ]
9b24c56a060269f90005953b2bd86b329164995b
https://github.com/opitzconsulting/orcas/blob/9b24c56a060269f90005953b2bd86b329164995b/orcas_core/build_source/orcas_diff/src/main/java/de/opitzconsulting/orcas/sql/WrapperReturnFirstValue.java#L43-L56
104,975
jenkinsci/groovy-plugin
src/main/java/hudson/plugins/groovy/GroovyInstallation.java
GroovyInstallation.getExecutable
public String getExecutable(VirtualChannel channel) throws IOException, InterruptedException { return channel.call(new MasterToSlaveCallable<String, IOException>() { public String call() throws IOException { File exe = getExeFile("groovy"); if (exe.exists()) { ...
java
public String getExecutable(VirtualChannel channel) throws IOException, InterruptedException { return channel.call(new MasterToSlaveCallable<String, IOException>() { public String call() throws IOException { File exe = getExeFile("groovy"); if (exe.exists()) { ...
[ "public", "String", "getExecutable", "(", "VirtualChannel", "channel", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "channel", ".", "call", "(", "new", "MasterToSlaveCallable", "<", "String", ",", "IOException", ">", "(", ")", "{", "...
Gets the executable path of this groovy installation on the given target system.
[ "Gets", "the", "executable", "path", "of", "this", "groovy", "installation", "on", "the", "given", "target", "system", "." ]
b58605265b0c4c34d2981a2f330ffe5573dc7417
https://github.com/jenkinsci/groovy-plugin/blob/b58605265b0c4c34d2981a2f330ffe5573dc7417/src/main/java/hudson/plugins/groovy/GroovyInstallation.java#L37-L49
104,976
jenkinsci/groovy-plugin
src/main/java/hudson/plugins/groovy/Groovy.java
Groovy.parseParams
private String[] parseParams(String line) { //JENKINS-24870 CommandLine.getExecutable tries to fix file separators, so if the first param contains slashes, it can cause problems //Adding some placeholder instead of executable CommandLine cmdLine = CommandLine.parse("executable_placeholder " + li...
java
private String[] parseParams(String line) { //JENKINS-24870 CommandLine.getExecutable tries to fix file separators, so if the first param contains slashes, it can cause problems //Adding some placeholder instead of executable CommandLine cmdLine = CommandLine.parse("executable_placeholder " + li...
[ "private", "String", "[", "]", "parseParams", "(", "String", "line", ")", "{", "//JENKINS-24870 CommandLine.getExecutable tries to fix file separators, so if the first param contains slashes, it can cause problems", "//Adding some placeholder instead of executable", "CommandLine", "cmdLine...
Parse parameters to be passed as arguments to the groovy binary
[ "Parse", "parameters", "to", "be", "passed", "as", "arguments", "to", "the", "groovy", "binary" ]
b58605265b0c4c34d2981a2f330ffe5573dc7417
https://github.com/jenkinsci/groovy-plugin/blob/b58605265b0c4c34d2981a2f330ffe5573dc7417/src/main/java/hudson/plugins/groovy/Groovy.java#L321-L331
104,977
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/PngOptimizer.java
PngOptimizer.getTotalSavings
public long getTotalSavings() { long totalSavings = 0; for (OptimizerResult result : results) { totalSavings += (result.getOriginalFileSize() - result.getOptimizedFileSize()); } return totalSavings; }
java
public long getTotalSavings() { long totalSavings = 0; for (OptimizerResult result : results) { totalSavings += (result.getOriginalFileSize() - result.getOptimizedFileSize()); } return totalSavings; }
[ "public", "long", "getTotalSavings", "(", ")", "{", "long", "totalSavings", "=", "0", ";", "for", "(", "OptimizerResult", "result", ":", "results", ")", "{", "totalSavings", "+=", "(", "result", ".", "getOriginalFileSize", "(", ")", "-", "result", ".", "ge...
Get the number of bytes saved in all images processed so far @return The number of bytes saved
[ "Get", "the", "number", "of", "bytes", "saved", "in", "all", "images", "processed", "so", "far" ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/PngOptimizer.java#L224-L231
104,978
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/PngOptimizer.java
PngOptimizer.generateDataUriCss
public void generateDataUriCss(String dir) throws IOException { final String path = (dir == null) ? "" : dir + "/"; final PrintWriter out = new PrintWriter(path + "DataUriCss.html"); try { out.append("<html>\n<head>\n\t<style>"); for (OptimizerResult result : results) { final String name = result.file...
java
public void generateDataUriCss(String dir) throws IOException { final String path = (dir == null) ? "" : dir + "/"; final PrintWriter out = new PrintWriter(path + "DataUriCss.html"); try { out.append("<html>\n<head>\n\t<style>"); for (OptimizerResult result : results) { final String name = result.file...
[ "public", "void", "generateDataUriCss", "(", "String", "dir", ")", "throws", "IOException", "{", "final", "String", "path", "=", "(", "dir", "==", "null", ")", "?", "\"\"", ":", "dir", "+", "\"/\"", ";", "final", "PrintWriter", "out", "=", "new", "PrintW...
Get the css containing data uris of the images processed by the optimizer
[ "Get", "the", "css", "containing", "data", "uris", "of", "the", "images", "processed", "by", "the", "optimizer" ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/PngOptimizer.java#L236-L265
104,979
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/processing/Base64.java
Base64.decodeToFile
public static void decodeToFile(String dataToDecode, String filename) throws IOException { Base64.OutputStream bos = null; try { bos = new Base64.OutputStream(new FileOutputStream(filename), Base64.DECODE); bos.write(dataToDecode.getBytes(PREFERRED_ENCODING)); } catch (IOException e) { throw e; // Catch ...
java
public static void decodeToFile(String dataToDecode, String filename) throws IOException { Base64.OutputStream bos = null; try { bos = new Base64.OutputStream(new FileOutputStream(filename), Base64.DECODE); bos.write(dataToDecode.getBytes(PREFERRED_ENCODING)); } catch (IOException e) { throw e; // Catch ...
[ "public", "static", "void", "decodeToFile", "(", "String", "dataToDecode", ",", "String", "filename", ")", "throws", "IOException", "{", "Base64", ".", "OutputStream", "bos", "=", "null", ";", "try", "{", "bos", "=", "new", "Base64", ".", "OutputStream", "("...
Convenience method for decoding data to a file. <p>As of v 2.3, if there is a error, the method will throw an IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it.</p> @param dataToDecode Base64-encoded data as a string @param fi...
[ "Convenience", "method", "for", "decoding", "data", "to", "a", "file", "." ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/processing/Base64.java#L1321-L1336
104,980
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/processing/zopfli/SymbolStats.java
SymbolStats.getFreqs
void getFreqs(LzStore store) { int[] sLitLens = this.litLens; int[] sDists = this.dists; System.arraycopy(Cookie.intZeroes, 0, sLitLens, 0, 288); System.arraycopy(Cookie.intZeroes, 0, sDists, 0, 32); int size = store.size; char[] litLens = store.litLens; char[] d...
java
void getFreqs(LzStore store) { int[] sLitLens = this.litLens; int[] sDists = this.dists; System.arraycopy(Cookie.intZeroes, 0, sLitLens, 0, 288); System.arraycopy(Cookie.intZeroes, 0, sDists, 0, 32); int size = store.size; char[] litLens = store.litLens; char[] d...
[ "void", "getFreqs", "(", "LzStore", "store", ")", "{", "int", "[", "]", "sLitLens", "=", "this", ".", "litLens", ";", "int", "[", "]", "sDists", "=", "this", ".", "dists", ";", "System", ".", "arraycopy", "(", "Cookie", ".", "intZeroes", ",", "0", ...
Why 32? Expect 30.
[ "Why", "32?", "Expect", "30", "." ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/processing/zopfli/SymbolStats.java#L29-L52
104,981
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/processing/zopfli/Zopfli.java
Zopfli.adler32
private static long adler32(byte[] data) { final Adler32 checksum = new Adler32(); checksum.update(data); return checksum.getValue(); }
java
private static long adler32(byte[] data) { final Adler32 checksum = new Adler32(); checksum.update(data); return checksum.getValue(); }
[ "private", "static", "long", "adler32", "(", "byte", "[", "]", "data", ")", "{", "final", "Adler32", "checksum", "=", "new", "Adler32", "(", ")", ";", "checksum", ".", "update", "(", "data", ")", ";", "return", "checksum", ".", "getValue", "(", ")", ...
Calculates the adler32 checksum of the data
[ "Calculates", "the", "adler32", "checksum", "of", "the", "data" ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/processing/zopfli/Zopfli.java#L34-L38
104,982
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/Logger.java
Logger.info
public void info(String message, Object... args) { if (DEBUG.equals(this.logLevel) || INFO.equals(this.logLevel)) { System.out.println(String.format(message, args)); } }
java
public void info(String message, Object... args) { if (DEBUG.equals(this.logLevel) || INFO.equals(this.logLevel)) { System.out.println(String.format(message, args)); } }
[ "public", "void", "info", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "if", "(", "DEBUG", ".", "equals", "(", "this", ".", "logLevel", ")", "||", "INFO", ".", "equals", "(", "this", ".", "logLevel", ")", ")", "{", "System", "....
Write info messages. Takes a varags list of args so that string concatenation only happens if the logging level applies.
[ "Write", "info", "messages", ".", "Takes", "a", "varags", "list", "of", "args", "so", "that", "string", "concatenation", "only", "happens", "if", "the", "logging", "level", "applies", "." ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/Logger.java#L41-L45
104,983
depsypher/pngtastic
src/main/java/com/googlecode/pngtastic/core/Logger.java
Logger.error
public void error(String message, Object... args) { if (!NONE.equals(this.logLevel)) { System.out.println(String.format(message, args)); } }
java
public void error(String message, Object... args) { if (!NONE.equals(this.logLevel)) { System.out.println(String.format(message, args)); } }
[ "public", "void", "error", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "NONE", ".", "equals", "(", "this", ".", "logLevel", ")", ")", "{", "System", ".", "out", ".", "println", "(", "String", ".", "format", "("...
Write error messages. Takes a varags list of args so that string concatenation only happens if the logging level applies.
[ "Write", "error", "messages", ".", "Takes", "a", "varags", "list", "of", "args", "so", "that", "string", "concatenation", "only", "happens", "if", "the", "logging", "level", "applies", "." ]
13fd2a63dd8b2febd7041273889a1bba4f2a6a07
https://github.com/depsypher/pngtastic/blob/13fd2a63dd8b2febd7041273889a1bba4f2a6a07/src/main/java/com/googlecode/pngtastic/core/Logger.java#L51-L55
104,984
fleipold/jproc
src/main/java/org/buildobjects/process/ProcBuilder.java
ProcBuilder.withWorkingDirectory
public ProcBuilder withWorkingDirectory(File directory) { if (!directory.isDirectory()) { throw new IllegalArgumentException("File '" + directory.getPath() + "' is not a directory."); } this.directory = directory; return this; }
java
public ProcBuilder withWorkingDirectory(File directory) { if (!directory.isDirectory()) { throw new IllegalArgumentException("File '" + directory.getPath() + "' is not a directory."); } this.directory = directory; return this; }
[ "public", "ProcBuilder", "withWorkingDirectory", "(", "File", "directory", ")", "{", "if", "(", "!", "directory", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"File '\"", "+", "directory", ".", "getPath", "(", ")",...
Override the wokring directory @param directory the working directory for the process @return this, for chaining
[ "Override", "the", "wokring", "directory" ]
617f498c63a822c6b0506a2474b3bc954ea25c9a
https://github.com/fleipold/jproc/blob/617f498c63a822c6b0506a2474b3bc954ea25c9a/src/main/java/org/buildobjects/process/ProcBuilder.java#L128-L134
104,985
fleipold/jproc
src/main/java/org/buildobjects/process/ProcBuilder.java
ProcBuilder.run
public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException { if (stdout != defaultStdout && outputConsumer != null) { throw new IllegalArgumentException("You can either ..."); } try { Proc proc = new Proc(command, args, env, stdin...
java
public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException { if (stdout != defaultStdout && outputConsumer != null) { throw new IllegalArgumentException("You can either ..."); } try { Proc proc = new Proc(command, args, env, stdin...
[ "public", "ProcResult", "run", "(", ")", "throws", "StartupException", ",", "TimeoutException", ",", "ExternalProcessFailureException", "{", "if", "(", "stdout", "!=", "defaultStdout", "&&", "outputConsumer", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentE...
Spawn the actual execution. This will block until the process terminates. @return the result of the successful execution @throws StartupException if the process can't be started @throws TimeoutException if the timeout kicked in @throws ExternalProcessFailureException if the external process returned a non-null exit val...
[ "Spawn", "the", "actual", "execution", ".", "This", "will", "block", "until", "the", "process", "terminates", "." ]
617f498c63a822c6b0506a2474b3bc954ea25c9a
https://github.com/fleipold/jproc/blob/617f498c63a822c6b0506a2474b3bc954ea25c9a/src/main/java/org/buildobjects/process/ProcBuilder.java#L198-L212
104,986
fleipold/jproc
src/main/java/org/buildobjects/process/ProcBuilder.java
ProcBuilder.run
public static String run(String cmd, String... args) { ProcBuilder builder= new ProcBuilder(cmd) .withArgs(args); return builder.run().getOutputString(); }
java
public static String run(String cmd, String... args) { ProcBuilder builder= new ProcBuilder(cmd) .withArgs(args); return builder.run().getOutputString(); }
[ "public", "static", "String", "run", "(", "String", "cmd", ",", "String", "...", "args", ")", "{", "ProcBuilder", "builder", "=", "new", "ProcBuilder", "(", "cmd", ")", ".", "withArgs", "(", "args", ")", ";", "return", "builder", ".", "run", "(", ")", ...
Static helper to run a process @param cmd the command @param args the arguments @return the standard output @throws StartupException if the process can't be started @throws TimeoutException if the timeout kicked in @throws ExternalProcessFailureException if the external process returned a non-null exit value
[ "Static", "helper", "to", "run", "a", "process" ]
617f498c63a822c6b0506a2474b3bc954ea25c9a
https://github.com/fleipold/jproc/blob/617f498c63a822c6b0506a2474b3bc954ea25c9a/src/main/java/org/buildobjects/process/ProcBuilder.java#L222-L227
104,987
fleipold/jproc
src/main/java/org/buildobjects/process/ProcBuilder.java
ProcBuilder.filter
public static String filter(String input, String cmd, String... args) { ProcBuilder builder= new ProcBuilder(cmd) .withArgs(args) .withInput(input); return builder.run().getOutputString(); }
java
public static String filter(String input, String cmd, String... args) { ProcBuilder builder= new ProcBuilder(cmd) .withArgs(args) .withInput(input); return builder.run().getOutputString(); }
[ "public", "static", "String", "filter", "(", "String", "input", ",", "String", "cmd", ",", "String", "...", "args", ")", "{", "ProcBuilder", "builder", "=", "new", "ProcBuilder", "(", "cmd", ")", ".", "withArgs", "(", "args", ")", ".", "withInput", "(", ...
Static helper to filter a string through a process @param input the input to be fed into the process @param cmd the command @param args the arguments @return the standard output @throws StartupException if the process can't be started @throws TimeoutException if the timeout kicked in @throws ExternalProcessFailureExcep...
[ "Static", "helper", "to", "filter", "a", "string", "through", "a", "process" ]
617f498c63a822c6b0506a2474b3bc954ea25c9a
https://github.com/fleipold/jproc/blob/617f498c63a822c6b0506a2474b3bc954ea25c9a/src/main/java/org/buildobjects/process/ProcBuilder.java#L238-L245
104,988
epam/parso
src/main/java/com/epam/parso/impl/CSVMetadataWriterImpl.java
CSVMetadataWriterImpl.writeSasFileProperties
@Override public void writeSasFileProperties(SasFileProperties sasFileProperties) throws IOException { constructPropertiesString("Bitness: ", sasFileProperties.isU64() ? "x64" : "x86"); constructPropertiesString("Compressed: ", sasFileProperties.getCompressionMethod()); constructPropertiesSt...
java
@Override public void writeSasFileProperties(SasFileProperties sasFileProperties) throws IOException { constructPropertiesString("Bitness: ", sasFileProperties.isU64() ? "x64" : "x86"); constructPropertiesString("Compressed: ", sasFileProperties.getCompressionMethod()); constructPropertiesSt...
[ "@", "Override", "public", "void", "writeSasFileProperties", "(", "SasFileProperties", "sasFileProperties", ")", "throws", "IOException", "{", "constructPropertiesString", "(", "\"Bitness: \"", ",", "sasFileProperties", ".", "isU64", "(", ")", "?", "\"x64\"", ":", "\"...
The method to output the sas7bdat file properties. @param sasFileProperties the variable with sas file properties data. @throws IOException appears if the output into writer is impossible.
[ "The", "method", "to", "output", "the", "sas7bdat", "file", "properties", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/CSVMetadataWriterImpl.java#L165-L189
104,989
epam/parso
src/main/java/com/epam/parso/impl/CSVMetadataWriterImpl.java
CSVMetadataWriterImpl.constructPropertiesString
private void constructPropertiesString(String propertyName, Object property) throws IOException { getWriter().write(propertyName + String.valueOf(property) + "\n"); }
java
private void constructPropertiesString(String propertyName, Object property) throws IOException { getWriter().write(propertyName + String.valueOf(property) + "\n"); }
[ "private", "void", "constructPropertiesString", "(", "String", "propertyName", ",", "Object", "property", ")", "throws", "IOException", "{", "getWriter", "(", ")", ".", "write", "(", "propertyName", "+", "String", ".", "valueOf", "(", "property", ")", "+", "\"...
The method to output string containing information about passed property using writer. @param propertyName the string containing name of a property. @param property a property value. @throws IOException appears if the output into writer is impossible.
[ "The", "method", "to", "output", "string", "containing", "information", "about", "passed", "property", "using", "writer", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/CSVMetadataWriterImpl.java#L198-L200
104,990
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.processEntry
private static String processEntry(Column column, Object entry, Locale locale, Map<Integer, Format> columnFormatters) throws IOException { if (!String.valueOf(entry).contains(DOUBLE_INFINITY_STRING)) { String valueToPrint; if (entry.getClass() == Da...
java
private static String processEntry(Column column, Object entry, Locale locale, Map<Integer, Format> columnFormatters) throws IOException { if (!String.valueOf(entry).contains(DOUBLE_INFINITY_STRING)) { String valueToPrint; if (entry.getClass() == Da...
[ "private", "static", "String", "processEntry", "(", "Column", "column", ",", "Object", "entry", ",", "Locale", "locale", ",", "Map", "<", "Integer", ",", "Format", ">", "columnFormatters", ")", "throws", "IOException", "{", "if", "(", "!", "String", ".", "...
Checks current entry type and returns its string representation. @param column current processing column. @param entry current processing entry. @param locale the locale for parsing date and percent elements. @param columnFormatters the map that stores (@link Column#id) column identifier...
[ "Checks", "current", "entry", "type", "and", "returns", "its", "string", "representation", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L225-L251
104,991
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.convertDateElementToString
private static String convertDateElementToString(Date currentDate, SimpleDateFormat dateFormat) { return currentDate.getTime() != 0 ? dateFormat.format(currentDate.getTime()) : ""; }
java
private static String convertDateElementToString(Date currentDate, SimpleDateFormat dateFormat) { return currentDate.getTime() != 0 ? dateFormat.format(currentDate.getTime()) : ""; }
[ "private", "static", "String", "convertDateElementToString", "(", "Date", "currentDate", ",", "SimpleDateFormat", "dateFormat", ")", "{", "return", "currentDate", ".", "getTime", "(", ")", "!=", "0", "?", "dateFormat", ".", "format", "(", "currentDate", ".", "ge...
The function to convert a date into a string according to the format used. @param currentDate the date to convert. @param dateFormat the formatter to convert date element into string. @return the string that corresponds to the date in the format used.
[ "The", "function", "to", "convert", "a", "date", "into", "a", "string", "according", "to", "the", "format", "used", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L260-L262
104,992
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.convertPercentElementToString
private static String convertPercentElementToString(Object value, DecimalFormat decimalFormat) { Double doubleValue = value instanceof Long ? ((Long) value).doubleValue() : (Double) value; return decimalFormat.format(doubleValue); }
java
private static String convertPercentElementToString(Object value, DecimalFormat decimalFormat) { Double doubleValue = value instanceof Long ? ((Long) value).doubleValue() : (Double) value; return decimalFormat.format(doubleValue); }
[ "private", "static", "String", "convertPercentElementToString", "(", "Object", "value", ",", "DecimalFormat", "decimalFormat", ")", "{", "Double", "doubleValue", "=", "value", "instanceof", "Long", "?", "(", "(", "Long", ")", "value", ")", ".", "doubleValue", "(...
The function to convert a percent element into a string. @param value the input numeric value to convert. @param decimalFormat the formatter to convert percentage element into string. @return the string with the text presentation of the input numeric value.
[ "The", "function", "to", "convert", "a", "percent", "element", "into", "a", "string", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L308-L311
104,993
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.trimZerosFromEnd
private static String trimZerosFromEnd(String string) { return string.contains(".") ? string.replaceAll("0*$", "").replaceAll("\\.$", "") : string; }
java
private static String trimZerosFromEnd(String string) { return string.contains(".") ? string.replaceAll("0*$", "").replaceAll("\\.$", "") : string; }
[ "private", "static", "String", "trimZerosFromEnd", "(", "String", "string", ")", "{", "return", "string", ".", "contains", "(", "\".\"", ")", "?", "string", ".", "replaceAll", "(", "\"0*$\"", ",", "\"\"", ")", ".", "replaceAll", "(", "\"\\\\.$\"", ",", "\"...
The function to remove trailing zeros from the decimal part of the numerals represented by a string. If there are no digits after the point, the point is deleted as well. @param string the input string trailing zeros. @return the string without trailing zeros.
[ "The", "function", "to", "remove", "trailing", "zeros", "from", "the", "decimal", "part", "of", "the", "numerals", "represented", "by", "a", "string", ".", "If", "there", "are", "no", "digits", "after", "the", "point", "the", "point", "is", "deleted", "as"...
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L320-L322
104,994
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.getValue
public static String getValue(Column column, Object entry, Locale locale, Map<Integer, Format> columnFormatters) throws IOException { String value = ""; if (entry != null) { if (entry.getClass().getName().compareTo(BYTE_ARRAY_CLASS_NAME) == 0) { ...
java
public static String getValue(Column column, Object entry, Locale locale, Map<Integer, Format> columnFormatters) throws IOException { String value = ""; if (entry != null) { if (entry.getClass().getName().compareTo(BYTE_ARRAY_CLASS_NAME) == 0) { ...
[ "public", "static", "String", "getValue", "(", "Column", "column", ",", "Object", "entry", ",", "Locale", "locale", ",", "Map", "<", "Integer", ",", "Format", ">", "columnFormatters", ")", "throws", "IOException", "{", "String", "value", "=", "\"\"", ";", ...
The method to convert the Object that stores data from the sas7bdat file cell to string. @param column the {@link Column} class variable that stores current processing column. @param entry the Object that stores data from the cell of sas7bdat file. @param locale the locale for parsing da...
[ "The", "method", "to", "convert", "the", "Object", "that", "stores", "data", "from", "the", "sas7bdat", "file", "cell", "to", "string", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L372-L383
104,995
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.getPercentFormatProcessor
private static Format getPercentFormatProcessor(ColumnFormat columnFormat, Locale locale) { DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale); if (columnFormat.getPrecision() == 0) { return new DecimalFormat("0%", dfs); } String pattern = "0%." + new String(new char...
java
private static Format getPercentFormatProcessor(ColumnFormat columnFormat, Locale locale) { DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale); if (columnFormat.getPrecision() == 0) { return new DecimalFormat("0%", dfs); } String pattern = "0%." + new String(new char...
[ "private", "static", "Format", "getPercentFormatProcessor", "(", "ColumnFormat", "columnFormat", ",", "Locale", "locale", ")", "{", "DecimalFormatSymbols", "dfs", "=", "new", "DecimalFormatSymbols", "(", "locale", ")", ";", "if", "(", "columnFormat", ".", "getPrecis...
The function to get a formatter to convert percentage elements into a string. @param columnFormat the (@link ColumnFormat) class variable that stores the precision of rounding the converted value. @param locale locale for parsing date elements. @return a formatter to convert percentage elements into a string.
[ "The", "function", "to", "get", "a", "formatter", "to", "convert", "percentage", "elements", "into", "a", "string", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L393-L400
104,996
epam/parso
src/main/java/com/epam/parso/DataWriterUtil.java
DataWriterUtil.getDateFormatProcessor
private static Format getDateFormatProcessor(ColumnFormat columnFormat, Locale locale) { if (!DATE_OUTPUT_FORMAT_STRINGS.containsKey(columnFormat.getName())) { throw new NoSuchElementException(UNKNOWN_DATE_FORMAT_EXCEPTION); } SimpleDateFormat dateFormat = new SimpleD...
java
private static Format getDateFormatProcessor(ColumnFormat columnFormat, Locale locale) { if (!DATE_OUTPUT_FORMAT_STRINGS.containsKey(columnFormat.getName())) { throw new NoSuchElementException(UNKNOWN_DATE_FORMAT_EXCEPTION); } SimpleDateFormat dateFormat = new SimpleD...
[ "private", "static", "Format", "getDateFormatProcessor", "(", "ColumnFormat", "columnFormat", ",", "Locale", "locale", ")", "{", "if", "(", "!", "DATE_OUTPUT_FORMAT_STRINGS", ".", "containsKey", "(", "columnFormat", ".", "getName", "(", ")", ")", ")", "{", "thro...
The function to get a formatter to convert date elements into a string. @param columnFormat the (@link ColumnFormat) class variable that stores the format name that must belong to the set of {@link DataWriterUtil#DATE_OUTPUT_FORMAT_STRINGS} mapping keys. @param locale locale for parsing date elements. @return a ...
[ "The", "function", "to", "get", "a", "formatter", "to", "convert", "date", "elements", "into", "a", "string", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/DataWriterUtil.java#L410-L418
104,997
epam/parso
src/main/java/com/epam/parso/impl/AbstractCSVWriter.java
AbstractCSVWriter.checkSurroundByQuotesAndWrite
static void checkSurroundByQuotesAndWrite(Writer writer, String delimiter, String trimmedText) throws IOException { writer.write(checkSurroundByQuotes(delimiter, trimmedText)); }
java
static void checkSurroundByQuotesAndWrite(Writer writer, String delimiter, String trimmedText) throws IOException { writer.write(checkSurroundByQuotes(delimiter, trimmedText)); }
[ "static", "void", "checkSurroundByQuotesAndWrite", "(", "Writer", "writer", ",", "String", "delimiter", ",", "String", "trimmedText", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "checkSurroundByQuotes", "(", "delimiter", ",", "trimmedText", ")", ...
The method to write a text represented by an array of bytes using writer. If the text contains the delimiter, line breaks, tabulation characters, and double quotes, the text is stropped. @param writer the variable to output data. @param delimiter if trimmedText contains this delimiter it will be stropped. @para...
[ "The", "method", "to", "write", "a", "text", "represented", "by", "an", "array", "of", "bytes", "using", "writer", ".", "If", "the", "text", "contains", "the", "delimiter", "line", "breaks", "tabulation", "characters", "and", "double", "quotes", "the", "text...
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/AbstractCSVWriter.java#L120-L122
104,998
epam/parso
src/main/java/com/epam/parso/impl/AbstractCSVWriter.java
AbstractCSVWriter.checkSurroundByQuotes
static String checkSurroundByQuotes(String delimiter, String trimmedText) throws IOException { boolean containsDelimiter = stringContainsItemFromList(trimmedText, delimiter, "\n", "\t", "\r", "\""); String trimmedTextWithoutQuotesDuplicates = trimmedText.replace("\"", "\"\""); if (containsDelimi...
java
static String checkSurroundByQuotes(String delimiter, String trimmedText) throws IOException { boolean containsDelimiter = stringContainsItemFromList(trimmedText, delimiter, "\n", "\t", "\r", "\""); String trimmedTextWithoutQuotesDuplicates = trimmedText.replace("\"", "\"\""); if (containsDelimi...
[ "static", "String", "checkSurroundByQuotes", "(", "String", "delimiter", ",", "String", "trimmedText", ")", "throws", "IOException", "{", "boolean", "containsDelimiter", "=", "stringContainsItemFromList", "(", "trimmedText", ",", "delimiter", ",", "\"\\n\"", ",", "\"\...
The method to output a text represented by an array of bytes. If the text contains the delimiter, line breaks, tabulation characters, and double quotes, the text is stropped. @param delimiter if trimmedText contains this delimiter it will be stropped. @param trimmedText the array of bytes that contains the text to o...
[ "The", "method", "to", "output", "a", "text", "represented", "by", "an", "array", "of", "bytes", ".", "If", "the", "text", "contains", "the", "delimiter", "line", "breaks", "tabulation", "characters", "and", "double", "quotes", "the", "text", "is", "stropped...
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/AbstractCSVWriter.java#L133-L140
104,999
epam/parso
src/main/java/com/epam/parso/impl/SasFileParser.java
SasFileParser.readNext
Object[] readNext(List<String> columnNames) throws IOException { if (currentRowInFileIndex++ >= sasFileProperties.getRowCount() || eof) { return null; } int bitOffset = sasFileProperties.isU64() ? PAGE_BIT_OFFSET_X64 : PAGE_BIT_OFFSET_X86; switch (currentPageType) { ...
java
Object[] readNext(List<String> columnNames) throws IOException { if (currentRowInFileIndex++ >= sasFileProperties.getRowCount() || eof) { return null; } int bitOffset = sasFileProperties.isU64() ? PAGE_BIT_OFFSET_X64 : PAGE_BIT_OFFSET_X86; switch (currentPageType) { ...
[ "Object", "[", "]", "readNext", "(", "List", "<", "String", ">", "columnNames", ")", "throws", "IOException", "{", "if", "(", "currentRowInFileIndex", "++", ">=", "sasFileProperties", ".", "getRowCount", "(", ")", "||", "eof", ")", "{", "return", "null", "...
The function to read next row from current sas7bdat file. @param columnNames list of column names which should be processed. @return the object array containing elements of current row. @throws IOException if reading from the {@link SasFileParser#sasFileStream} stream is impossible.
[ "The", "function", "to", "read", "next", "row", "from", "current", "sas7bdat", "file", "." ]
fb132cf943ba099a35b2f5a1490c0a59641e09dc
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/SasFileParser.java#L506-L549