congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StringUtil
Code IndexAdd Tabnine to your IDE (free)

How to use
StringUtil
in
org.eclipse.jetty.util

Best Java code snippets using org.eclipse.jetty.util.StringUtil (Showing top 20 results out of 405)

Refine searchRefine arrow

  • Logger
origin: org.eclipse.jetty/jetty-util

if (StringUtil.isBlank(methodName))
    LOG.ignore(e);
    LOG.ignore(e);
origin: org.eclipse.jetty/jetty-util

@Override
public boolean matches(SNIServerName serverName)
  if (LOG.isDebugEnabled())
    LOG.debug("SNI matching for {}", serverName);
    host = StringUtil.asciiToLowerCase(host);
    if (LOG.isDebugEnabled())
      LOG.debug("SNI matched {}->{}", host, _x509);
origin: org.eclipse.jetty/jetty-security

  throw new IllegalStateException("No config path set");
if (LOG.isDebugEnabled())
  LOG.debug("Loading {} from {}", this, _configPath);
      roleArray = StringUtil.csvSplit(roles);
    known.add(username);
    Credential credential = Credential.getCredential(credentials);
if (LOG.isDebugEnabled())
  LOG.debug("Loaded " + this + " from " + _configPath);
origin: org.eclipse.jetty/jetty-security

LOG.debug("jsecuritycheck {} {}",username,user);
HttpSession session = request.getSession(false);
if (user!=null)
  LOG.debug("authenticated {}->{}",form_auth,nuri);
if (LOG.isDebugEnabled())
  LOG.debug("Form authentication FAILED for " + StringUtil.printable(username));
if (_formErrorPage == null)
origin: org.eclipse.jetty/jetty-webapp

if(LOG.isDebugEnabled())
  LOG.debug("addJar - {}", fn);
String fnlc=fn.getName().toLowerCase(Locale.ENGLISH);
  jar=StringUtil.replace(jar, ",", "%2C");
  jar=StringUtil.replace(jar, ";", "%3B");
  addClassPath(jar);
LOG.warn(Log.EXCEPTION,ex);
origin: org.eclipse.jetty.osgi/jetty-osgi-boot

/** 
 * @see org.osgi.util.tracker.BundleTracker#addingBundle(org.osgi.framework.Bundle, org.osgi.framework.BundleEvent)
 */
@Override
public Object addingBundle(Bundle bundle, BundleEvent event)
{
  try
  {
    String serverName = (String)bundle.getHeaders().get(OSGiServerConstants.MANAGED_JETTY_SERVER_NAME);
    if ((StringUtil.isBlank(serverName) && _managedServerName.equals(OSGiServerConstants.MANAGED_JETTY_SERVER_DEFAULT_NAME))
       || (!StringUtil.isBlank(serverName) && (serverName.equals(_managedServerName))))
    {
      if (bundleAdded (bundle))
        return bundle;
    }
  }
  catch (Exception e)
  {
    LOG.warn(e);
  }
  return null;
}
origin: com.ovea.tajin.server/tajin-server-jetty9

  jar=StringUtil.replace(jar, ",", "%2C");
  jar=StringUtil.replace(jar, ";", "%3B");
  addClassPath(jar);
LOG.warn(Log.EXCEPTION,ex);
origin: org.eclipse.jetty/jetty-quickstart

/**
 * @param w the source WebAppContext
 * @param extraXML any extra xml snippet to append
 * @param originAttribute param value to use for the context param origin attribute
 * @param generateOrigin <code>true</code> to generate the origin attribute
 */
public QuickStartDescriptorGenerator (WebAppContext w, String extraXML, String originAttribute, boolean generateOrigin)
{
  _webApp = w;
  _extraXML = extraXML;
  _originAttribute = (StringUtil.isBlank(originAttribute)?DEFAULT_ORIGIN_ATTRIBUTE_NAME:originAttribute);
  _generateOrigin = generateOrigin || LOG.isDebugEnabled();
  _count = 0;
}

origin: apache/nifi

Charset charset = Charset.forName(context.getProperty(CHARSET).evaluateAttributeExpressions(flowFile).getValue());
if (StringUtil.isBlank(logPrefix)) {
  dashedLine = StringUtils.repeat('-', 50);
} else {
origin: org.eclipse.jetty.aggregate/jetty-all-server

public void decodeQueryTo(MultiMap parameters, String encoding)
  throws UnsupportedEncodingException
{
  if (_query==_fragment)
    return;
  if (encoding==null || StringUtil.isUTF8(encoding))
    UrlEncoded.decodeUtf8To(_raw,_query+1,_fragment-_query-1,parameters);
  else
    UrlEncoded.decodeTo(StringUtil.toString(_raw,_query+1,_fragment-_query-1,encoding),parameters,encoding);
}
origin: org.eclipse.jetty/jetty-util

protected void addName(String cn)
{
  cn=StringUtil.asciiToLowerCase(cn);
  if (cn.startsWith("*."))
    _wilds.add(cn.substring(2));
  else
    _hosts.add(cn);
}
origin: org.eclipse.jetty/jetty-util

/**
* Parse a CSV string using {@link #csvSplit(List,String, int, int)}
* @param s The string to parse
* @return An array of parsed values.
*/
public static String[] csvSplit(String s)
{
  if (s==null)
    return null;
  return csvSplit(s,0,s.length());
}

origin: org.eclipse.jetty/jetty-http

public static void setJettyVersion(String serverVersion)
{
  SEND[SEND_SERVER] = StringUtil.getBytes("Server: " + serverVersion + "\015\012");
  SEND[SEND_XPOWEREDBY] = StringUtil.getBytes("X-Powered-By: " + serverVersion + "\015\012");
  SEND[SEND_SERVER | SEND_XPOWEREDBY] = StringUtil.getBytes("Server: " + serverVersion + "\015\012X-Powered-By: " +
      serverVersion + "\015\012");
}
origin: org.eclipse.jetty.aggregate/jetty-webapp

buf.append(',');
buf.append(' ');
StringUtil.append2digits(buf, day_of_month);
StringUtil.append2digits(buf, year/100);
StringUtil.append2digits(buf, year%100);
StringUtil.append2digits(buf, hours);
buf.append(':');
StringUtil.append2digits(buf, minutes);
buf.append(':');
StringUtil.append2digits(buf, seconds);
buf.append(" GMT");
origin: org.ops4j.pax.web/pax-web-jetty

@Override
public boolean isProtectedTarget(String target) {
  // Fixes PAXWEB-196 and PAXWEB-211
  //CHECKSTYLE:OFF
  while (target.startsWith("//")) {
    target = URIUtil.compactPath(target);
  }
  //CHECKSTYLE:ON
  return StringUtil.startsWithIgnoreCase(target, "/web-inf")
      || StringUtil.startsWithIgnoreCase(target, "/meta-inf")
      || StringUtil.startsWithIgnoreCase(target, "/osgi-inf")
      || StringUtil.startsWithIgnoreCase(target, "/osgi-opt");
}
origin: org.eclipse.jetty.aggregate/jetty-all-server

private static String deTag(String raw) 
{
  return StringUtil.replace( StringUtil.replace(raw,"<","&lt;"), ">", "&gt;");
}

origin: com.ovea.tajin.server/tajin-server-jetty9

private byte[] asByteBuffer()
{
  if ((statusCode == StatusCode.NO_CLOSE) || (statusCode == StatusCode.NO_CODE) || (statusCode == (-1)))
  {
    // codes that are not allowed to be used in endpoint.
    return null;
  }
  int len = 2; // status code
  byte utf[] = null;
  if (StringUtil.isNotBlank(reason))
  {
    utf = StringUtil.getUtf8Bytes(reason);
    len += utf.length;
  }
  byte buf[] = new byte[len];
  buf[0] = (byte)((statusCode >>> 8) & 0xFF);
  buf[1] = (byte)((statusCode >>> 0) & 0xFF);
  if (utf != null)
  {
    System.arraycopy(utf,0,buf,2,utf.length);
  }
  return buf;
}
origin: nz.ac.auckland.lmz.javascript/javascript-resources

public String getNamespace() {
  if (StringUtil.isNotBlank(namespace)) {
    return namespace;
  }
  return DEFAULT_RESOURCE_NAMESAPCE;
}
origin: org.eclipse.jetty.aggregate/jetty-server

public void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
{
  if (_inputState != __NONE)
    return;
  _characterEncoding = encoding;
  // check encoding is supported
  if (!StringUtil.isUTF8(encoding))
    // noinspection ResultOfMethodCallIgnored
    "".getBytes(encoding);
}
origin: org.eclipse.jetty.aggregate/jetty-all-server

if (LOG.isDebugEnabled()) LOG.debug("Form authentication FAILED for " + StringUtil.printable(username));
if (_formErrorPage == null)
org.eclipse.jetty.utilStringUtil

Javadoc

Fast String Utilities. These string utilities provide both convenience methods and performance improvements over most standard library versions. The main aim of the optimizations is to avoid object creation unless absolutely required.

Most used methods

  • isBlank
    Test if a string is null or only has whitespace characters in it. Note: uses codepoint version of Ch
  • asciiToLowerCase
    fast lower case conversion. Only works on ascii (not unicode)
  • csvSplit
    Split a quoted comma separated string to a listHandle rfc4180 [https://www.ietf.org/rfc/rfc4180.txt]
  • replace
    replace substrings within string.
  • append2digits
    Append 2 digits (zero padded) to the StringBuilder
  • getBytes
  • isNotBlank
    Test if a string is not null and contains at least 1 non-whitespace characters in it. Note: uses cod
  • isUTF8
  • startsWithIgnoreCase
  • printable
  • append
    Append substring to StringBuilder
  • normalizeCharset
    Convert alternate charset names (eg utf8) to normalized name (eg UTF-8).
  • append,
  • normalizeCharset,
  • sanitizeXmlString,
  • toString,
  • toInt,
  • getUtf8Bytes,
  • truncate,
  • indexOfControlChars,
  • nonNull,
  • toLong

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now