Codota Logo
jodd.net
Code IndexAdd Codota to your IDE (free)

How to use jodd.net

Best Java code snippets using jodd.net (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: oblac/jodd

/**
 * Decodes query name or value.
 */
public static String decodeQuery(final String source, final String encoding) {
  return decode(source, encoding, true);
}
origin: oblac/jodd

/**
 * Encodes the given URI query parameter with the given encoding.
 */
public static String encodeQueryParam(final String queryParam, final String encoding) {
  return encodeUriComponent(queryParam, encoding, URIPart.QUERY_PARAM);
}
public static String encodeQueryParam(final String queryParam) {
origin: oblac/jodd

/**
 * Sets HTML text, but decodes it first.
 */
public void setTextValue(final String text) {
  encodedText = text;
  nodeValue = HtmlDecoder.decode(text);
}
origin: oblac/jodd

/**
 * Creates URL builder for user-friendly way of building URLs.
 * Provided path is parsed and {@link #encodeUri(String) encoded}.
 * @see #build(String, boolean)
 */
public static Builder build(final String path) {
  return build(path, true);
}
origin: oblac/jodd

/**
 * Returns the corresponding MIME type to the given extension.
 * If no MIME type was found it returns <code>application/octet-stream</code> type.
 */
public static String getMimeType(final String ext) {
  String mimeType = lookupMimeType(ext);
  if (mimeType == null) {
    mimeType = MIME_APPLICATION_OCTET_STREAM;
  }
  return mimeType;
}
origin: oblac/jodd

/**
 * Encodes attribute value that will be double quoted.
 * In this case, only these entities are encoded:
 * <ul>
 *     <li><code>&amp;</code> with <code>&amp;amp;</code></li>
 *     <li><code>"</code> with <code>&amp;quot;</code></li>
 *     <li><code>&amp;&nbsp;</code></li>
 * </ul>
 */
public static String attributeDoubleQuoted(final CharSequence value) {
  return encode(value, ATTR_DQ, LEN);
}
origin: oblac/jodd

public static HttpStatus409 error409() {
  return new HttpStatus409();
}
public static HttpStatus500 error500() {
origin: oblac/jodd

public TextResult status(final HttpStatus httpStatus) {
  this.status = httpStatus.status();
  return this;
}
origin: oblac/jodd

/**
 * Decodes URL elements. This method may be used for all
 * parts of URL, except for the query parts, since it does
 * not decode the '+' character.
 * @see #decodeQuery(String, String)
 */
public static String decode(final String source, final String encoding) {
  return decode(source, encoding, false);
}
origin: oblac/jodd

/**
 * Encodes the given URI path segment with the given encoding.
 */
public static String encodePathSegment(final String segment, final String encoding) {
  return encodeUriComponent(segment, encoding, URIPart.PATH_SEGMENT);
}
public static String encodePathSegment(final String segment) {
origin: oblac/jodd

/**
 * Encodes XML string. In XML there are only 5 predefined character entities.
 */
public static String xml(final CharSequence text) {
  return encode(text, TEXT_XML, LEN_XML);
}
origin: oblac/jodd

/**
 * Decodes query name or value.
 */
public static String decodeQuery(final String source) {
  return decode(source, JoddCore.encoding, true);
}
origin: oblac/jodd

/**
 * Encodes the given URI user info with the given encoding.
 */
public static String encodeUserInfo(final String userInfo, final String encoding) {
  return encodeUriComponent(userInfo, encoding, URIPart.USER_INFO);
}
public static String encodeUserInfo(final String userInfo) {
origin: oblac/jodd

/**
 * Encodes a string to HTML-safe text. The following characters are replaced:
 * <ul>
 * <li><code>&amp;</code> with <code>&amp;amp;</code></li>
 * <li><code>&lt;</code> with <code>&amp;lt;</code></li>
 * <li><code>&gt;</code> with <code>&amp;gt;</code></li>
 * <li><code>\u00A0</code> with <code>&nbsp;</code></li>
 * </ul>
 */
public static String text(final CharSequence text) {
  return encode(text, TEXT, LEN);
}
origin: oblac/jodd

/**
 * Decodes URL elements.
 */
public static String decode(final String url) {
  return decode(url, JoddCore.encoding, false);
}
origin: oblac/jodd

/**
 * Encodes the given URI path with the given encoding.
 */
public static String encodePath(final String path, final String encoding) {
  return encodeUriComponent(path, encoding, URIPart.PATH);
}
public static String encodePath(final String path) {
origin: oblac/jodd

/**
 * Encodes attribute value that will be single quoted.
 * In this case, only two entities are encoded:
 * <ul>
 *     <li><code>&amp;</code> with <code>&amp;amp;</code></li>
 *     <li><code>'</code> with <code>&amp;#39;</code></li>
 *     <li><code>&amp;&nbsp;</code></li>
 * </ul>
 */
public static String attributeSingleQuoted(final CharSequence value) {
  return encode(value, ATTR_SQ, LEN);
}
origin: oblac/jodd

/**
 * Encodes the given URI scheme with the given encoding.
 */
public static String encodeScheme(final String scheme, final String encoding) {
  return encodeUriComponent(scheme, encoding, URIPart.SCHEME);
}
public static String encodeScheme(final String scheme) {
origin: oblac/jodd

/**
 * Encodes the given URI port with the given encoding.
 */
public static String encodePort(final String port, final String encoding) {
  return encodeUriComponent(port, encoding, URIPart.PORT);
}
public static String encodePort(final String port) {
origin: oblac/jodd

/**
 * Encodes the given URI query with the given encoding.
 */
public static String encodeQuery(final String query, final String encoding) {
  return encodeUriComponent(query, encoding, URIPart.QUERY);
}
public static String encodeQuery(final String query) {
jodd.net

Most used classes

  • MimeTypes
    Map file extensions to MIME types. Based on the most recent Apache mime.types file. Duplicated exten
  • HtmlEncoder
    Encodes text and URL strings in various ways resulting HTML-safe text. All methods are null safe. In
  • URLCoder
    Encodes URLs correctly, significantly faster and more convenient. Here is an example of full URL: ht
  • HttpMethod
    Http request methods. See: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods
  • HttpStatus
    Simple developer-friendly set of HttpStatus codes and messages.
  • HttpStatus$HttpStatus401,
  • HttpStatus$HttpStatus403,
  • HttpStatus$HttpStatus404,
  • URLCoder$Builder,
  • HtmlDecoder,
  • HttpStatus$HttpStatus500,
  • HtmlDecoder$Ptr,
  • HttpStatus$HttpStatus400,
  • HttpStatus$HttpStatus405,
  • HttpStatus$HttpStatus408,
  • HttpStatus$HttpStatus409,
  • HttpStatus$HttpStatus503,
  • URLCoder$URIPart
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now