Tabnine Logo
IOUtils.getPath
Code IndexAdd Tabnine to your IDE (free)

How to use
getPath
method
in
org.jfree.io.IOUtils

Best Java code snippets using org.jfree.io.IOUtils.getPath (Showing top 8 results out of 315)

origin: jfree/jcommon

/**
 * Extracts the file name from the URL.
 *
 * @param url the url.
 * @return the extracted filename.
 */
public String getFileName(final URL url) {
  final String file = getPath(url);
  final int last = file.lastIndexOf("/");
  if (last < 0) {
    return file;
  }
  return file.substring(last + 1);
}
origin: org.jfree/jcommon

/**
 * Extracts the file name from the URL.
 *
 * @param url the url.
 * @return the extracted filename.
 */
public String getFileName(final URL url) {
  final String file = getPath(url);
  final int last = file.lastIndexOf("/");
  if (last < 0) {
    return file;
  }
  return file.substring(last + 1);
}
origin: jfree/jcommon

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
origin: org.jfree/jcommon

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns <code>true</code> if the URL represents a path, and 
 * <code>false</code> otherwise.
 * 
 * @param baseURL  the URL.
 * 
 * @return A boolean.
 */
private boolean isPath(final URL baseURL) {
  if (getPath(baseURL).endsWith("/")) {
    return true;
  }
  else if (baseURL.getProtocol().equals("file")) {
    final File f = new File(getPath(baseURL));
    try {
      if (f.isDirectory()) {
        return true;
      }
    }
    catch (SecurityException se) {
      // ignored ...
    }
  }
  return false;
}
origin: jfree/jcommon

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
origin: org.jfree/com.springsource.org.jfree

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
origin: org.jfree/jcommon

final List urlName = parseName(getPath(url));
final List baseName = parseName(getPath(baseURL));
final String query = getQuery(url);
org.jfree.ioIOUtilsgetPath

Javadoc

Implements the JDK 1.3 method URL.getPath(). The path is defined as URL.getFile() minus the (optional) query.

Popular methods of IOUtils

  • <init>
    DefaultConstructor.
  • copyStreams
    Copies the InputStream into the OutputStream, until the end of the stream has been reached.
  • copyWriter
    Copies the contents of the Reader into the Writer, until the end of the stream has been reached.
  • formatName
    Transforms the name list back into a single string, separated with "/".
  • getQuery
    Implements the JDK 1.3 method URL.getPath(). The path is defined as URL.getFile() minus the (optiona
  • isFileStyleProtocol
    Checks, whether the URL uses a file based protocol.
  • isPath
    Returns true if the URL represents a path, andfalse otherwise.
  • isSameService
    Checks, whether the URL points to the same service. A service is equal if the protocol, host and por
  • parseName
    Parses the given name and returns the name elements as List of Strings.
  • startsWithUntil
    Compares both name lists, and returns the last common index shared between the two lists.
  • createRelativeURL
    Creates a relative url by stripping the common parts of the the url.
  • getFileExtension
    Returns the file extension of the given file name. The returned value will contain the dot.
  • createRelativeURL,
  • getFileExtension,
  • getInstance,
  • stripFileExtension

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
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