Tabnine Logo
URLHelper.urlDecode
Code IndexAdd Tabnine to your IDE (free)

How to use
urlDecode
method
in
com.helger.commons.url.URLHelper

Best Java code snippets using com.helger.commons.url.URLHelper.urlDecode (Showing top 5 results out of 315)

origin: com.helger/ph-oton-core

 @Override
 @Nonnull
 protected IReadableResource getResource (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
                      @Nonnull final String sFilename)
 {
  // URL decode is required because requests contain e.g. "%20"
  final String sFilename1 = URLHelper.urlDecode (sFilename);

  return new ClassPathResource (sFilename1);
 }
}
origin: com.helger/ph-oton-core

/**
 * Get the user data object matching the passed request and filename
 *
 * @param aRequestScope
 *        HTTP request
 * @param sFilename
 *        Filename as extracted from the URL
 * @return Never <code>null</code>.
 */
@Nonnull
@OverrideOnDemand
protected UserDataObject getUserDataObject (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
                      @Nonnull final String sFilename)
{
 // URL decode is required because requests contain e.g. "%20"
 final String sFilename1 = URLHelper.urlDecode (sFilename);
 return new UserDataObject (sFilename1);
}
origin: com.helger/ph-oton-core

@Override
@OverridingMethodsMustInvokeSuper
public EContinue initRequestState (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
                  @Nonnull final UnifiedResponse aUnifiedResponse)
{
 // cut the leading "/"
 final String sFilename = URLHelper.urlDecode (aRequestScope.getPathWithinServlet ());
 if (StringHelper.hasNoText (sFilename) ||
   !isValidFilenameAccordingToTheRules (sFilename) ||
   isPossibleDirectoryTraversalRequest (sFilename))
 {
  // Send the same error code as if it is simply not found to confuse
  // attackers :)
  LOGGER.warn ("Illegal delivery request '" + sFilename + "'");
  aUnifiedResponse.setStatus (HttpServletResponse.SC_NOT_FOUND);
  return EContinue.BREAK;
 }
 // Filename seems to be safe
 aRequestScope.attrs ().putIn (REQUEST_ATTR_OBJECT_DELIVERY_FILENAME, sFilename);
 return EContinue.CONTINUE;
}
origin: com.helger/peppol-directory-indexer

final String sDocumentTypeID = URLHelper.urlDecode (sHref.substring (nIndex + URL_PART_SERVICES.length ()),
                          StandardCharsets.UTF_8);
final IDocumentTypeIdentifier aDocTypeID = aIdentifierFactory.parseDocumentTypeIdentifier (sDocumentTypeID);
origin: com.helger/peppol-directory-indexer

final String sDocumentTypeID = URLHelper.urlDecode (sHref.substring (nIndex + URL_PART_SERVICES.length ()),
                          StandardCharsets.UTF_8);
final IDocumentTypeIdentifier aDocTypeID = aIdentifierFactory.parseDocumentTypeIdentifier (sDocumentTypeID);
com.helger.commons.urlURLHelperurlDecode

Popular methods of URLHelper

  • getAsURL
  • getAsURI
  • getParsedQueryParameters
  • urlEncode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Notification (javax.management)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Github Copilot alternatives
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