Tabnine Logo
StringUtils.toHex
Code IndexAdd Tabnine to your IDE (free)

How to use
toHex
method
in
com.kloudtek.util.StringUtils

Best Java code snippets using com.kloudtek.util.StringUtils.toHex (Showing top 2 results out of 315)

origin: com.kloudtek.ktutils/ktutils-core

public static String urlPathEncode( String path ) {
  StringBuilder buffer = new StringBuilder();
  for (char c : path.toCharArray()) {
    if (UNSAFE_URLPATH.indexOf(c) >= 0) {
      buffer.append('%');
      buffer.append(toHex(c / 16));
      buffer.append(toHex(c % 16));
    } else if( c < 32 && c > 128 ) {
      buffer.append(urlEncode(Character.toString(c)));
    } else {
      buffer.append(c);
    }
  }
  return buffer.toString();
}
origin: com.kloudtek.ktutils/ktutils

public static String urlPathEncode(String path) {
  StringBuilder buffer = new StringBuilder();
  for (char c : path.toCharArray()) {
    if (UNSAFE_URLPATH.indexOf(c) >= 0) {
      buffer.append('%');
      buffer.append(toHex(c / 16));
      buffer.append(toHex(c % 16));
    } else if (c < 32 && c > 128) {
      buffer.append(urlEncode(Character.toString(c)));
    } else {
      buffer.append(c);
    }
  }
  return buffer.toString();
}
com.kloudtek.utilStringUtilstoHex

Popular methods of StringUtils

  • base64Decode
  • isBlank
  • utf8
    Convert UTF-8 encoded byte arrays to a string
  • base64Encode
  • isEmpty
  • isNotBlank
  • urlEncode
    URL encode a string using UTF-8
  • base32Decode
  • base32Encode
  • isNotEmpty
  • substituteVariables
    Substitute variables in a string.
  • urlPathEncode
  • substituteVariables,
  • urlPathEncode,
  • capitalize,
  • containsVariableSubstitution,
  • getVarSubFuncPattern,
  • nextChar,
  • resolveVarSub,
  • resolveVarSubFail,
  • splitTwoArgFunction

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top Vim 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